[英]I am trying to install node locally following error occurs. I tried reinstalling node several times but still it shows error
I get this error when I try to install node当我尝试安装节点时出现此错误
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
try this first before installing node.在安装节点之前先试试这个。
sudo npm cache verify sudo npm cache clean --force
After installing verify your installation:安装后验证您的安装:
node --version
节点--版本
several things you can try are following您可以尝试的几件事如下
sudo npm cache clean --force
trying changing ownership of npm and try npm latest尝试更改 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
give it a try by clearing up the proxy, maybe you're behind proxy通过清除代理来尝试一下,也许你落后于代理
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/
Lately i would like to recommend you to use the NVM package .最近我想推荐你使用NVM package 。 it is not the solution to your answer directly but its a great way to manage and have different node/npm environments https://davidwalsh.name/nvm
它不是直接解决您的答案,而是管理和拥有不同节点/npm 环境的好方法https://davidwalsh.name/nvm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.