Closed reazan closed 3 years ago
Update: the problem seems to appear only to Vue2 SFC. In a new Vite + Vue3 project the issue is not present. Kind Regards
For me rolling back to 29.5 fixed the issue for now.
Did you follow the "Setup for Vue 2" instructions at https://github.com/johnsoncodehk/volar/tree/master/extensions/vscode-vue-language-features#using ?
For me this error shows up only when those steps are not performed.
I use vetur with nuxt (nuxt2 and vue3 syntax via @nuxtjs/composition-api
).
As suggested by @rchl (thank you!), I RTFMd and these steps fixed it for me:
// package.json
{
"devDependencies": {
"@vue/runtime-dom": "latest"
}
}
yarn install
(so that the lockfile is rebuilt with the new dynamic entry "latest")// tsconfig.json{
"compilerOptions": {
...
},
"vueCompilerOptions": {
"experimentalCompatMode": 2, // delete after migrating to vue3 (or nuxt3)
"experimentalTemplateCompilerOptions": {
"compatConfig": { "MODE": 2 } // delete after migrating to vue3 (or nuxt3)
}
}
}
I wish vetur could detect this error and hint at me that I need to follow these steps, without having to google around. :pray:
Thanks everyone for your comments.
I tried a couple of things and what fixed the issue for me is following the "Setup for Vue 2" instructions and basically install the "@vue/runtime-dom" and added to the tsconfig.json (Thanks @rchl)
After that the only issue I get is a "JSX element type '__VLS_9' does not have any construct or call signatures.ts(2604)" on a "hgroup" tag that it is basically deprecated so I think it is ok
Thanks again I am closing the issue
Hello, I have a problem after the update of Volar at 21/11/2021, 12:46:47
I have a Vue2@2.6.12 project (no cli) with
All the SFC files has this error but webpack still work. Last week didn't have the problem
Thanks in advance and for the awesome tool :)