Open Laurelin opened 1 month ago
The relevant tsconfig files:
tsconfig.json
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.vitest.json"
}
]
}
and tsconfig.app.json
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
The latest version of extension is 2.1.6
I think I have the same issue. I generated an app using electron forge and their vite typescript template. All I've done is add an sfc, added lang="ts" and setup to both templates, and I've got this error now.
Here's the repo + branch that has the issue: https://github.com/dyllandry/desktop-clocks/tree/cannot-find-module
I'm using:
Downgrading @vue/language-server and @vue/typescript-plugin to 2.0.29 fixes this issue, but then I get the same errors as in this issue: https://github.com/vuejs/language-tools/issues/4706 . Following their solution of editing the package.json of @vue/language-server to not include the ~
in its @volar/language-server dependency and reinstalling its deps worked. That kind of solution would undo itself if I ever reinstall @vue/typescript-plugin, though.
Vue - Official extension or vue-tsc version
1.8.27
VSCode version
1.93.1
Vue version
^3.4.29
TypeScript version
~5.4.0
System Info
package.json dependencies
No response
Steps to reproduce
run
npm create vue@latest
make sure to choose Typescriptgo to Main.ts,
import App from './App.vue';
has a red squiggle under './App.vue' error is 'Cannot find module './App.vue' or its corresponding type declarations.ts(2307)'What is expected?
.vue files are recognized by TS
What is actually happening?
.vue files are not recognized by TS
Link to minimal reproduction
No response
Any additional comments?
There's a recent closed issue on this
https://github.com/vuejs/language-tools/issues/4118