-
-
Notifications
You must be signed in to change notification settings - Fork 438
Cannot find module 'file.vue' or its corresponding type declarations #4118
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
Comments
Same issue here. Fixed it with |
I'm already on v1.8.27 |
Same issue. Why did it happen?
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["declarations/**/*.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.json"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"lib": ["ES2017", "DOM", "DOM.Iterable"],
"composite": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"types": ["vitest/globals"]
}
}
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
"compilerOptions": {
"composite": true,
"types": ["node"]
}
}
{
"extends": "./tsconfig.app.json",
"include": ["declarations/**/*.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.json"],
"exclude": [],
"compilerOptions": {
"composite": true,
"types": ["node", "vitest/globals"]
}
}
{
"files": [],
"references": [
{
"path": "./tsconfig.config.json"
},
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.vitest.json"
}
]
} |
I noticed that the Vue-official plugin load typescript config file is different from the built-in typescript plugin, If the I don't know how to explain... There are two tsconfig files, |
I find this #2548, But It's not support for v2 |
this is also an issue for me |
@michaelangeloio Set the VSCode settings |
I also have this issue in JetBrains WebStorm |
I fixed this by creating declare module '*.vue'; |
Closing this one as many things have changed since 2.x. Feel free to create a new issue with a minimal reproduction if you're still having issues, thanks! |
Good morning,
Everything was working fine until now, then suddenly, I opened my
./src/router/index.ts
file and I got lots of errors telling me for my view imports for my router by example :I have the error:
And the same error in my
./src/main.ts
with :Only *.vue files are affected
Everything was working fine before, I don't know what happened in the meantime.
Here are my TypeScript configuration files:
tsconfig.app.json
tsconfig.node.json
tsconfig.json
I'm on Vue version 3.4.21
The text was updated successfully, but these errors were encountered: