简体   繁体   中英

How can I fix this npm error? npm ERR! Windows_NT 10.0.19042

I had no errors when I downgraded to npm@3.10.10 I got this error that keeps showing every time I use npm to update it self or to install anything new, What can I do?

npm ERR! Windows_NT 10.0.19042
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\usr\\local\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "npm@latest"
npm ERR! node v14.17.1
npm ERR! npm  v3.10.10

npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\hp\Documents\npm-debug.log

Option 1: Follow this directory C:\\Users(your username)\\AppData\\Roaming Delete the npm folder and if there is one npm cache folder. Run npm clean cache —force ( — force is now required to clean cache) You should be good now if not do option 2.

Option 2: Follow this directory C:\\Users(your username)\\AppData\\Roaming Delete the npm folder and if there is one mom cache folder. Run npm clean cache —force ( — force is now required to clean cache) Make sure everything to do with Nodejs is deleted and uninstalled. Reinstall Nodejs. You should be good now. https://github.com/nodejs/help/issues/2874

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM