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
[ERROR] Cannot find *.vue module and its type declarations #1897
Comments
did you install this one https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin ? As far as i know if you want to support .ts files you have 2 options:
Activating takeover mode is the recommended way i think so maybe you could switch to that option. |
Thank you to all the repliers. Since I installed Volar extension, I haven't had any issues and I've been promoting it for Vue 3 + TypeScript. Until 3 days ago that I used a create-vue project instead of a Vite one, that this issue started. So something evidently changed and I can't understand what. The fact that VSCode told me to install the TS Plugin says something. So that's why I opened this issue. Not because I don't know who to set up Take Over Mode or those things. Of course, I did the steps for Take Over Mode, and everything seems to be working now. |
Hello again. Didn't want to saturate the issues section, so I will make my question here, that is directly related to this issue. New QuestionThat means that every time that we make a project, pure Vue TS, Nuxt TS, etc., we need to go to Extensions, filter by built-in, find the typescript & javascript extension, disable it for the workspace, reload the workspace? |
@angelhdzmultimedia Yes, Vue document has great explain for it: https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode And you should also track microsoft/vscode#40239 |
@johnsoncodehk is there support for vscode insiders? i installed both volar and the typescript vue plugin, but i'm still getting i cannot use takeover mode. it crashes vscode whenever i do. |
@unicornware can you reproduce this problem in https://github.com/johnsoncodehk/volar-starter? Please provide repro case and open a new issue if it can't reproduce. And how takeover mode crashes VSCode? |
This helped me : VSC + Volar setup : https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode (mentioned in issue : #1173) |
Volar was working like a charm last time I worked on a Vue 3 TypeScript Vite project.
Today, I created a project with create-vue (which uses Vite too, but provides more options),
and I'm getting this error when a *.ts file has focus:
Then, VSCode recommended me the TypeScript Volar extension, and I installed it, and the error went away,
but I'm now confused, didn't Volar already have TS support? Why do I need this other extension now?
Thanks.
The text was updated successfully, but these errors were encountered: