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
Cannot find module ts(2307) #1173
Comments
You could use take over mode instead of TS plugin to avoid this problem for now. |
Thanks for your reply. Will this be fixed in the "regular" typescript mode? |
I will fix TS plugin in next version. |
Cool!! thx |
For those who landed on this page, like me, here's how you set the "takeover" mode in your VS Code: https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode |
I have a custom module created in a vite/vue-create project with the vue3 composition setup syntax.
When ever I try to import that component in a normal index.ts file, I get error ts(2307) "Cannot find module './validated-input.vue' or its corresponding type declarations.ts(2307)"
In file validated-input.vue
In file index.ts in same folder
The import of the component in index.ts gives the error. It doesn't seem to recognize the component.
vue-tsc --noEmit doesn't seem to give an error for index.ts
It must be be something that got into one of the latest releases, because I've just noticed that i even get this error in main.ts on the import of App.vue.
To reproduce it:
And now there is an error in main.ts for the import of App.vue
npm run typecheck does not give an error.
The text was updated successfully, but these errors were encountered: