Could not find a declaration file for module x #14159
-
Describe the bugI just create a vite project with TypeScript within. What's happening is that i got the error Here is the way that I'am doing the imports: Interesting thing is that in the local enviroment whorks just fine, using windows. I thoung at first that was just some kind of warning. Turns out that when i upload to the Netlify service, the build dind't go as well. Any ideia on how to solve that and why this is happening to my project?? The full error: Reproductionhttps://github.com/Bumboobee/presente-misterioso.git Steps to reproduce
System InfoWindows Used Package Managernpm LogsCould not find a declaration file for module './context/quiz'. 'c:/path_to_project/quiz.jsx' implicitly has an 'any' type. Validations
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
I guess you need to set |
Beta Was this translation helpful? Give feedback.
-
In my case, it's because I copied a tsconfig from a Next.js project and retained the Changing it back to |
Beta Was this translation helpful? Give feedback.
-
我这里的也存在这样的问题,虽然提示,但是不影响运行。 |
Beta Was this translation helpful? Give feedback.
I guess you need to set
"allowJs": true
intsconfig.json
.