解决npm install时npm ERR! Unexpected end of JSON input while parsing near

最近我的npm发抽了似的,安装各种依赖出现各种报错,直接记录一下。

问题

执行npm install时,控制台的部分报错:

npm ERR! Unexpected end of JSON input while parsing near '...7839d064dd0d46cd1b88e'

npm ERR! A complete log of this run can be found in:
npm ERR!     E:\DeveloperTool\nodejs\node_cache\_logs\2021-01-04T08_02_35_882Z-debug.log

报错截图,如下:

解决

  1. 清除缓存
npm cache clean --force

注意:清楚缓存可能需要一些时间,耐心等待~

  1. 重新安装
npm install

  1. 试试npm run dev,服务器启动成功了!
posted @ 2021-01-04 16:46  MelodyJerry  阅读(327)  评论(0编辑  收藏  举报
没有伞的孩子必须努力奔跑!|
载入天数...载入时分秒...
(っ•̀ω•́)っ✎⁾⁾ 开心每一天