i tried to clone my friends project from git, and it says
Vite manifest not found at: D:laravelPBL-Kelompok-5-2publicbuild/manifest.json
Start the development server
Run npm run dev in your terminal and refresh the page.
so i tried to type npm run dev on my terminal and cmd, but still cant work. i tried type npm install, npm -g install, etc, and the tried to type npm run dev, it still cant work. the error says
D:laravelPBL-Kelompok-5-2>npm install
added 138 packages, removed 238 packages, and audited 139 packages in 2s
35 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
D:laravelPBL-Kelompok-5-2>npm run dev
node:internal/modules/cjs/loader:1147
throw err;
^
Error: Cannot find module 'D:laravelPBL-Kelompok-5-2node_modulesnpmbinnpm-cli.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.11.1
node:internal/modules/cjs/loader:1147
throw err;
^
Error: Cannot find module 'D:laravelPBL-Kelompok-5-2node_modulesnpmbinnpm-cli.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.11.1
idk what happened, i already tried turend off my windows firewall, it still cant work too
please help me, this is for my school project. sorry in advance about any grammar mistakes
2
Answers
It is 100% due to node or npm versions. Verify firstly that you have the required versions installed by running
If you do and it still gives errors then I recommend reinstalling npm like
But make sure to verify the dependencies in package.json before you do this. It will be under
dependencies:npm
most likelyIf that doesn’t work, manully delete the node_modules and run
npm i
againFirst things first:
A module not found error basically says that that a modules doesn’t exists (or the entrypoint file), so check if this directory exists:
If it doesn’t, this might be a cache or broken module issue.
Your package.json is stating that you need a module and this module for some reason is not available in the build.
I suggest you do the following:
These commands will respectively: remove your node_modules folder, clean npm cache and reinstall all modules again.
The last option: you can reinstall nodeJs as it can be a root problem (a problem that not lies in your project).