Reputation: 161
I am facing an error while running the server after creating a vite application please help me resolve this.
I was learning threejs and just created a vite application with vanilla framework and javascript as the language , it was all created smoothly but npm run dev shows the error which i cant seem to resolve.
I tried installing .json file after removing but still no good.
Upvotes: 13
Views: 33155
Reputation: 119
IF YOU ARE USING WINDOWS: As none of these answers helped me, I went to see the code that was causing this error and found this:
Then, I just followed the link to get the vc++ executable, in my case https://aka.ms/vs/17/release/vc_redist.arm64.exe
as I was experiencing the problem on Windows (being ran through Parallels Desktop on Mac, but I dont think that was the issue here).
Other possible options for the link mentioned are
vc_redist.arm64.exe
,vc_redist.x86.exe
andvc_redist.x64.exe
After the installation, I reopened the PowerShell and the error was gone! Hope this helps!
Upvotes: 1
Reputation: 5851
Running npm install @rollup/rollup-win32-x64-msvc
solved the issue.
Upvotes: 5
Reputation: 171
I had the same issue, and it was caused by importing normalizePath
from the Vite library.
This occurred while working with Vite v4.x and v5.x (I switched versions trying to fix it) in an Electron app on Windows. Removing the normalizePath
import fixed the problem.
Upvotes: 0
Reputation: 364
npm update
npm run dev
This worked for me
Upvotes: 6
Reputation: 583
Remove node_modules and package-lock.json is worked for me.
rm -rf node_modules package-lock.json
and then :
npm install
npm run dev
or can refer this one.
https://github.com/evanw/esbuild/issues/1646#issuecomment-2157017990
Upvotes: 7
Reputation: 830
I had this issue. you just need to delete node_module and package-lock.json and run:
npm I
this way worked for me.
Upvotes: 1
Reputation: 147
You can try "npm install [email protected]" or "npm install [email protected]", it will solve the issue
Upvotes: 13