1. 设置npm源
bash
# 获取npm源地址
npm get registry
# npm config get registry
# 使用淘宝的源
npm config set registry http://registry.npm.taobao.org/
# 恢复成官方的源
npm config set registry https://registry.npmjs.org/
123456789
2. 清理缓存问题
bash
npm ERR! Unexpected end of JSON input while parsing near '.../openpgpjs.org\r\n\r\'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\10956\AppData\Roaming\npm-cache\_logs\2019-03-17T08_27_13_328Z-debug.log
123
解决方案:
bash
npm cache clean --force
1
评论 (0)