npm install 安装依赖报错

npm ERR! Unexpected end of JSON input while parsing near '...2.4.8","karma":"~0.10'

如上:我们在终端用npm install 安装依赖时,有时会报上述错误。

解决方法:

清除缓存

npm cache clean --force

落后就要吃土,努力吧,骚年!!!
原文地址:https://www.cnblogs.com/u-damowang1/p/12031321.html