例如:
安装webpack、webpack-cli时
使用:npm i webpack webpack-cli --save-dev,
出现问题:error Unexpected end of JSON input while parsing near ‘…"@types/node":"^9.6.4’
解决办法:
第一步:npm install --registry=https://registry.npm.taobao.org --loglevel=silly
第二步:npm cache clean --force
第三步:npm install
之后再执行安装命令即可
文章参考于:https://blog.csdn.net/qq_39165556/article/details/90599213