-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
.ts error doesn't disappear until you edit the file #1274
Comments
We do not support watch node_modules changes yet, LSP does not have a good solution to watch node_modules without performance issue currently. You could use |
@johnsoncodehk would it be possible to only watch npm, yarn and pnpm lock files? That way we would know when there are dependency changes. No need to watch the whole node_modules dir. |
Report a newly discovered problem, not sure if it is related to the problem, after creating a new VUE file, introduce a file with an alias, TS will alert that the corresponding module or type can not be found, but the path is correct. The error will not stop until I restart vscode, tsconfig. Exe in my project. JSON configures path and baseUrl |
Fixed by #3788 |
I'm not sure this is a Volar bug, but you'd think this wouldn't happen in pure .ts projects, given how long TypeScript already exists.
I also had this annoying bug quite a number of times already under productive circumstances. But this is a reproducible case I could come up with.
In an empty directory, run
...with "Yes" to just the following question:
Open the
vue-project
directory with VS Code.Enable take-over mode for the workspace.
Open a tab for
/src/main.ts
.'vue'
in the first lineimport { createApp } from 'vue'
has wavy, red underlining ("Cannot find module 'vue' or its corresponding type declarations. ts(2307)").With VS Code and its
main.ts
tab still open, outside of VS Code, runnpm install
in the project directory.The error persists, even when closing and reopening the
main.ts
tab. When you add a space at the end of the file and wait a moment, the error disappears.As I wrote, the error also happens under productive circumstances where an edit in a file should resolve the error in another file, but where I have to edit the other file like adding a space for the errors to disappear. This already confused me and made me think what in the world I missed that the errors persist, when in reality the errors weren't there anymore and it was just a kind of refresh that was necessary.
The text was updated successfully, but these errors were encountered: