-
Notifications
You must be signed in to change notification settings - Fork 12.9k
adding typescript 5 option "verbatimModuleSyntax": true in tsconfig causes crash #53302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Waiting for microsoft/TypeScript#53302 May be replaced by tsconfig/bases#160 See also https://twitter.com/youyuxi/status/1636551895002255362
@mlippert In you case it crashes because of this line: {
"importsNotUsedAsValues": "error"
} (I guess) since this prop doesn't exist anymore, which triggers a I just discovered that with another setup. But I agree that errors regarding new options should be explicitly handled with a clean message describing what's wrong when it's easily detectable. |
Thanks for tracking that down. Is there any way I can still extend from I had thought that setting This is just because I'd like my code to use the latest best practice as soon as I can make it work. If it has to wait for that base config to be updated, it has to wait, but I thought I'd ask. |
The I am getting this error as well, and coming from the |
@mlippert As far as I know (but I may not know all the hidden options), it's not possible to ignore/undefine a config prop (I have never tried @jsaraiva That's indeed a good point, it's not a removal but still a deprecation as of <v5.5. Hopefully they'll quickly fix that because I think that's a relatively easy fix. |
It seems that setting |
Won't that cause other issues by removing necessary imports? Also, I see this has been closed and a PR merged to address the issue but using the latest (5.0.4 at the time of writing) Typescript version, I'm still seeing the same problem. I'm using Astro, which has the following tsconfig:
Which I then extend with this:
Is there something else I should be doing? |
I am facing the same issue. |
See the docs on what the old values for importsNotUsedAsValues did. In particular:
So setting (at least that's how I read the docs, if I got that wrong someone please correct me!) And here are the docs for verbatimModuleSyntax. |
@mlippert, yeah, I had already seen the docs, which is why I raised the question of whether the |
What we discovered together with a colleague is that if you update to latest version of Vue Plugin (1.6.5) and Vue Language Features (1.6.5) fixes the problem. |
Bug Report
π Search Terms
π Version & Regression Information
verbatimModuleSyntax
option in typescript version5.0.2
β― Playground Link
This doesn't seem code related, it seems related to the compiler options
π» Code
tsconfig.json
π Actual behavior
Note that if I set
"verbatimModuleSyntax": false
it doesn't crash. The build runs.π Expected behavior
A clean build or an error message about what is incompatible with setting
"verbatimModuleSyntax": true
.The text was updated successfully, but these errors were encountered: