npm安装webpack出错:
npm ERR! Unexpected end of JSON input while parsing near '...H8W8xVrh2ZvqVNW8XR6
GJ'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-04-26T0
6_23_22_056Z-debug.log
原因:可能是网络较慢,或者需要翻墙
安装照如下方法,我的错误就解决了
解决方法:
1,设置下npm 国内仓库地址
npm config set registry="http://r.cnpmjs.org"
2,安装webpack
npm install -g webpack@1.14.0