-
Notifications
You must be signed in to change notification settings - Fork 14
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
error TS2307: Cannot find module
error in vue3 + vite while type checking (vue-tsc --build
)
#47
Comments
Potential solutionThe plan to solve the bug involves creating type declaration files for the missing modules and updating the What is causing this bug?The bug is caused by the absence of type declarations for the modules CodeType Declaration FilesCreate the following type declaration files to resolve the missing module errors:
|
I believe this problem is due to your |
I have same problem, the problem is in tsconfig moduleResolution, the package is not support "bundler" and must set "Node10", but tsconfig's docs says "bundler" is best chooise over "Node10" (node). |
What can I do if I have to leave the moduleResolution on bundler? |
Summary
I am getting the following error while type checking a vue3 + vite project. The configs are default as generated by
pnpm create vue@latest
. Even though type checking viavue-tsc
results in an error the build complete successfully. Also the app runs fine in both dev and production mode.Repro Steps:
pnpm install
.pnpm build
. Notice that the build succeed.pnpm type-check
.Expected: No error in type checking
Observed: Type checking fails with error.
Is there something missing from the config?
The text was updated successfully, but these errors were encountered: