I am using following command to create new project
npm create vite@latest (
name: » react3, framework: React variant: JavaScript)
cd react3
npm install
npm run dev
When running npm run dev the following error shows
Platform
Windows Home 10 64bit, Version 1909, Node.js v20.9.0
> [email protected] dev
> vite
node:internal/modules/cjs/loader:1327
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The specified module could not be found.
\?D:react3node_modules@rolluprollup-win32-x64-msvcrollup.win32-x64-msvc.node
at Module._extensions..node (node:internal/modules/cjs/loader:1327:18)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (D:react3node_modulesrollupdistnative.js:60:48)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12) {
code: 'ERR_DLOPEN_FAILED'
}
**Node.js v20.9.0**
2
Answers
Delete node_modules folder and reinstall dependencies as administrator with npm install
And:
I had the same problem, this solved it. install Microsoft Visual C++ 2015 Redistributable (x64).
source