尝试安装节点时出现此错误
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2020-08-29T13_30_35_085Z-debug.log
答案 0 :(得分:0)
在安装节点之前先尝试执行此操作。
sudo npm cache verify
sudo npm cache clean --force
安装后,请验证您的安装:
node --version
答案 1 :(得分:0)
您可以尝试的以下几项
sudo npm cache clean --force
尝试更改npm的所有权并尝试最新的npm
sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib
sudo chown -R $(whoami) /usr/local/bin
npm install -g npm@latest
尝试清理代理,也许您落后于代理
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/
最近我想建议您使用 NVM软件包 。这不是直接解决问题的方法,而是管理和拥有不同节点/ npm环境的好方法 https://davidwalsh.name/nvm