Open fabis94 opened 3 years ago
Where path is your file changed?
Vetur will listen to project files, but not in node_modules
and outside project.
It's clearly able to find the files once to be able to resolve them once, it just doesn't keep tracking any updates to types inside them
It's clearly able to find the files once to be able to resolve them once, it just doesn't keep tracking any updates to types inside them
If vetur listen file changed, the type also will update.
If you provide a repro case, we can study quickly. https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md
Same here.
Also if you rename a variable, intellisense still shows the old name:
Vetur 0.35
Project uses: Vue3 + Typescript 4.4.4
VS Code:
Version: 1.62.2
Commit: 3a6960b964327f0e3882ce18fcebd07ed191b316
Date: 2021-11-11T20:51:30.084Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.14.14-2-default
Info
Problem
In a TypeScript + Vue project, it seems like Vetur caches a specific state of TypeScript types, and then when these TypeScript types are changed, Vetur doesn't know anything about it and reports misleading errors.
For example: I add a new value to an Enum and try to use it in Vue - Vetur reports the Enum value doesn't exist. Or I add a new method inside a module that is definitely exported out from that module - Vetur reports the method doesn't exist.
Only after triggering a restart of the Vue Language Server through the "Vetur: Restart VLS" command does Vetur finally parse all of the types again and realizes they have changed.
Is this a common issue? Is there a way to deal with this without having to trigger a restart of VLS every 5 minutes?