npm ERR! Unexpected end of JSON input while parsing near '...-resolve":"^1.11.2"

npm install安装错误.

5180 verbose npm v6.14.5
5181 error Unexpected end of JSON input while parsing near '...-resolve":"^1.11.2","'
5182 verbose exit [ 1, true ]

可能是npm源的问题,更换Taobao源就可以了

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

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

然后在重新运行nup install

原文地址:https://www.cnblogs.com/montai/p/13332812.html