npm ERR! code ...

今天 npm 下载报的错整理如下

一 npm ERR! code E400
下载nrm
nrm ls
nrm use cnpm
nrm use npm
二 npm ERR! code E404
查看
npm config get proxy
npm config get https-proxy

npm config set proxy null
npm config set https-proxy null

npm config set registry http://registry.cnpmjs.org/

npm config get registry
https://registry.npm.taobao.org

npm config set registry https://registry.npmjs.org
三 【npm ERR! Unexpected end of JSON input while parsing near ‘…sh_time":141072930277’】
1.直接执行 npm cache clean --force, 如果执行成功,再npm install即可。
2.如果执行失败,请先升级npm,即npm i -g npm, 最后再执行npm cache clean --force, 最后再npm install.
3.如果还执行失败,那就先npm cache verify,再npm cache clean --force,最后再npm install。
4.如果还是执行失败,那么恭喜你,跟我一样了。我也是这样走到这一步的。那就往复的执行 【先npm cache clean --force再npm install】,一直到npm cache clean --force执行成功即可,然后npm install即成功。我前后往复执行了三次才成功!骚年,加油!
转载自mcya

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值