Can someone help please?
npm install is not working. I’m getting the following error
Error: Cannot find module ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’
In fact the bin directory under the npm directory is also missing.
I tried installing 2 versions of node (node v 10.16.3 and also 12.13.1), but the problem still exists. Also the full error message is given below:
C:\Program Files\nodejs>npm install
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: ‘MODULE_NOT_FOUND’,
requireStack:
}
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’
e[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)e[39m
e[90m at Function.Module._load (internal/modules/cjs/loader.js:690:27)e[39m
e[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)e[39m
e[90m at internal/main/run_main_module.js:17:11e[39m {
code: e[32m’MODULE_NOT_FOUND’e[39m,
requireStack:
}