首页 > 技术文章 > npm install 报错

everythingcw 2019-01-29 10:59 原文

今天准备在服务器上部署一下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

推荐阅读