Cannot find module '/@/xxx' or its corresponding type declarations.Vetur(2307)
See original GitHub issue- I have searched through existing issues
- I have read through docs
- I have read FAQ
- I have tried restarting VS Code or running
Vetur: Restart VLS
Info
- Platform: macos
- Vetur version: v.0.33.1
- VS Code version: 1.55.2
- vue version: 3.0.0
Problem
Reproducible Case
cannot find module /@/xx on vite2 app.
// vitejs config
alias: {
'/@': path.resolve(__dirname, 'src')
}
base on issue https://github.com/vuejs/vetur/issues/1896 and mr https://github.com/vuejs/vetur/pull/2525, but the error is still having
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Cannot find module xxx · Issue #1896 · vuejs/vetur - GitHub
The error message "cannot find module 'components/models'" is ... Cannot find module '/@/service' or its corresponding type declarations. in ...
Read more >Cannot find module '/@/xxx' or its corresponding ... - Issuehunt
Cannot find module '/@/xxx' or its corresponding type declarations.Vetur(2307) #2875 · I have searched through existing issues · I have read through docs...
Read more >Ask Question - Stack Overflow
"Cannot find module './components/Navigation' or its corresponding type declarations (Vetur 2307).". I realized that this only happens when I ...
Read more >cannot find module or its corresponding type declarations ...
In one of my TypeScript files I am importing a Vue component using this line: import KTUserMenu from "@/layout/header/partials/UserMenu.vue";. But it is ......
Read more >Cannot find module 'xxx' or its corresponding type ... - CSDN博客
问题描述:Cannot find module 'store/index' or its corresponding type declarations.Vetur(2307)原因分析:以当前项目的上级目录为根目录, Vetur ...
Read more >Top Related Medium Post
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just wanted to add that in addition to updating
tsconfig.json
as described here, I also had to create ashims-vue.d.ts
file (per StackOverflow thread) and place it in my root Vue directory.Here’s the contents of the file:
🥲
https://vuejs.github.io/vetur/guide/FAQ.html#vetur-can-t-recognize-components-imported-using-webpack-s-alias