0

First, I want to say I installed the NPM using npm install --force on my Laravel folder project. because if I use without --force it will show npm err. After installation finished I try to run npm run dev then the CMD show something like this

internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'C:\xampp\htdocs\newapp\node_modules\npm\bin\npm-cli.js'
[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)[39m
[90m    at Function.Module._load (internal/modules/cjs/loader.js:745:27)[39m
[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)[39m
[90m    at internal/main/run_main_module.js:17:47[39m {
  code: [32m'MODULE_NOT_FOUND'[39m,
  requireStack: []
}

Please help me to solve this problem, Thanks

  • 1
    `--force` should not be needed, `npm install` will suffice. What's the error you got when installing using `npm install`? What version of Laravel? What version of `npm`? What version of `node`? – brombeer Sep 13 '21 at 09:35
  • Please check this link here is your answer: https://stackoverflow.com/questions/24721903/npm-npm-cli-js-not-found-when-running-npm – Kaleem Shoukat Sep 13 '21 at 09:40

0 Answers0