-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Unable to resolve module './App.vue' #8336
Comments
Same issue here, it happens when trying to import the |
Hey guys! To fix this error, add a shim file for Vue files. Create a new file like declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<object, object, any>
export default component
} Yeah, that's it. This error will be gone. |
@hungify Problem with this solution is it seems to break Go to Definition. For example, do Go to Definition on |
try adding this to your tsconfig.json and installing You should not need to add the shim. I think vscode does this automatically but i'm not sure of the details |
Confirmed that @fazulk suggestion worked. To clarify, install npm i -D @vue/typescript-plugin Add the plugin to your {
"compilerOptions": {
"plugins": [{ "name": "@vue/typescript-plugin" }]
}
} Hoping I can daily drive Zed now 🤞 |
This should be a problem with the vue plugin, the official vscode plugin for vue is solving the problem of conflicts between the two language servers |
One problem I find is that if your vue project is a subfolder of the Zed workspace, the issue persists, even with the compilerOptions settings above. I tested the same in VSCode and the issue doesn't occur there, so there still seems to be something that Zed is doing. |
Nothing worked for me. |
Check for existing issues
Describe the bug / provide steps to reproduce it
Look at the screenshot, it's weird.
It's fine on VS Code.

Repo: https://github.com/hungify/zed-vue-resolve-import
Environment
Zed: v0.124.4 (Zed Preview)
OS: macOS 14.3.1
Memory: 16 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.The text was updated successfully, but these errors were encountered: