解决npm ERR! Unexpected end of JSON input while parsing near的方法汇总
目录
npm ERR! Unexpected end of JSON input while parsing near
3种解决方案
删掉package.lock.json
清除cache
npm cache clean --force
进入下面这个文件夹清除cache
路径:C:/Users/PC/AppData/Roaming/npm-cache
执行:
npm cache clean --force
不要用淘宝镜像
npm set registry https://registry.npmjs.org/