npm install 报错

今天准备在服务器上部署一下pm2,发现 npm install -g pm2   爆出了错误

error Unexpected end of JSON input while parsing near '....

 

上网查了好久,终于查到了解决方法:

第一步 

npm install --registry=https://registry.npm.taobao.org --loglevel=silly

第二步

npm cache clean --force

 

源地址:https://blog.csdn.net/qq_38372358/article/details/79551446

posted @ 2019-01-29 10:59  cw556666  阅读(155)  评论(0)    收藏  举报