Error: exec NPM config get prefix error: command failed: NPM config get prefix — a solution to NPM error reporting
Directory error: exec NPM config get prefix error: command failed: NPM config get prefix — a solution to NPM error reporting content solution how error reporting occurs
Error content
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'process-nextick-args'
Require stack:
- C:\Users\wh2008112\AppData\Roaming\npm\node_modules\npm\node_modules\readable-stream\lib\_stream_readable.js
....
Solution:
Find NPM cache and NPM folder (previous version of NPM cache) in roaming folder
Roaming Directory:
C:\Users\Administrator\AppData\Roaming
Move NPM cache and NPM folder into nodejs folder
3. Check the NPM version, that is, solve the problem
npm -v
How do errors occur
In the process of NPM install failure, the NPM package was downgraded (down to 3.8, up to now the NPM version is 8.3.X). This problem occurred when upgrading again
It may be caused by the inconsistency between the old version of NPM and the new version of NPM cache directory. So that repeated redoing of nodejs can not be solved. You can only manually move the folder for operation.
Similar Posts:
- [Solved] NPM installation Vue scaffold error: npm ERR! Unexpected end of JSON input while parsing near…
- [Solved] NPM downloads the dependency of the front-end Vue admin template master template Error
- [Solved] Error reporting of NPM packaged electron app
- npm install: npm ERR! errno -4048, Error: EPERM: operation not permitted[How to Solve]
- [Node.js] fs.renameSync() Error: Error: ENOENT: no such file or directory, rename…
- After installing nodejs, running NPM – V will cause (module. JS: 339 throw err..) error. Solution
- Solution to the problem of bash: gulp: command not found after installing gulp in Windows system
- [Solved] Nodejs Error: Cannot find module ‘express’
- nvm is not compatible with the npm config prefix option:
- npm run build : No such file or directory [How to Solve]