-
-
Notifications
You must be signed in to change notification settings - Fork 590
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
Vetur ignoring tsconfig.json from project when running VSCode in workspace mode #687
Comments
I'm experiencing the same problem. If I just load up my project without a workspace everything works as expected. But the moment I load up my Vue project inside a workspace Vetur is not using the tsconfig.json file from the project. |
This is tracked in #424 |
@TheAkio How do you "place the same tsconfig.json in the workspace directory"? |
@chris-dura You copy the tsconfig.json from your project directory and paste it into your workspace directory. A symlink might work too but I didn't test it. Basically there needs to be a tsconfig.json in your workspace directory too until this is fixed. |
@TheAkio it does fix the problem, but at the same time, it no longer recognize the "@/components/HelloWorld.vue" file in the import statement |
@chungweileong94 I guess we might just have to use VSCode without multi-root-workspace when working on such applications. |
I have the same issue and i found little workaround in a workspace mode! If you place your nuxt/frontend project on the top of workspaces tree then Vetur obviously read tsconfig from this first workspace and everything works without warnings/errors in .vue files. |
@squalsoft That's a great workaround. I was facing the same issue - after generating Vue project using CLI, Vetur was giving me 2 errors: Opening my fresh Vue project in first workspace made error disappear. |
Info
Problem
Vetur ignores tsconfig.json in project (or at least the experimentalDecorators option) when running VSCode in workspace mode.
Reproducible Case
I used the nuxt TypeScript template from here and had the folder open in a workspace. I was simply getting this error message on decorators:
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
After some time i figured I might try without using the workspace so I opened the project directly and the error was gone. In addition I also tried placing the same tsconfig.json in the workspace directory which also worked.
I think vetur has no proper VSCode workspace functionality yet for finding the tsconfig.json.
Related issues
#567
nuxt-community/typescript-template#5
The text was updated successfully, but these errors were encountered: