综合网上各种解决方案
我的node版本是v8.9.4 npm版本是5.6.0
有说降版本的,这个我没试过
npm -g install npm@4
另外几个命令:
npm cache verify
npm cache clean
npm cache clean --force
npm i -g npm
grep -ir "sha1-xxxxxxxxxxxxxxxx" ~/.npm
npm install -g cnpm --registry=https://registry.npm.taobao.org
我采用的是npm cache verify npm install
其实我也不知道成功没有,但至少不报上面那个错了,后面有时间继续更新……
另外最重要的一点 多试几次 多试几次 多试几次
最后一点,这搭个环境都那么费事的东西为什么那么多人喜欢用!!