【NPM】npm ERR! Unexpected end of JSON input while parsing near '…",'解决方案
今天安装项目依赖npm install 的时候出现错误:
npm ERR! Unexpected end of JSON input while parsing near '...e":"^23.5.0","listr":'
npm cache clean --force
npm install --registry=https://registry.npm.taobao.org (再安装)
执行以上操作依然没解决问题。最后切换为官方镜像后解决了,具体原因不详。
- npm cache clean --force
- npm set registry https://registry.npmjs.org/