How to resolve 'Cannot find module' and 'noEmit' issues in TypeScript project with Vite? #4151
Unanswered
MuhammadSaim
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Could you do the following: move the configuration into the "tsconfig.app.json" file and add the following inside "compilerOptions":
|
Beta Was this translation helpful? Give feedback.
1 reply
-
In my project, I copied everything from the "tsconfig.app.json" and "tsconfig.node.json" files and added it all to the main file, which is "tsconfig.json". From my point of view, it doesn't make much sense to create two configuration files, as it will depend on the size of each project. It turned out like this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Cannot find module: I'm encountering an error Cannot find module
@/lib/utils
even though I have configured path aliases in bothtsconfig.json
andvite.config.ts
. It seems like TypeScript or Vite isn't resolving the alias properly.tsconfig.json
vite.config.ts
I still couldn't get the alias right If I import using relative directory path working fine but the @ alias has an error.
Beta Was this translation helpful? Give feedback.
All reactions