npm ERR! Unexpected end of JSON input while

 时间:2026-02-17 04:29:08

1、今天用npm编译时候报错:

C:\Users\king\vue-devtools>npm install

npm ERR! Unexpected end of JSON input while parsing near '...0.0","stream-to-obser'

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\king\AppData\Roaming\npm-cache\_logs\2018-10-28T02_27_43_867Z-debug.log

通过查找归纳,找到解决办法

npm ERR! Unexpected end of JSON input while

2、首先清除npm编译的一些缓存,使用命令:

npm cache clean --force

npm ERR! Unexpected end of JSON input while

3、接下来,重新编译需要编译的包

npm install

编译成功:如下所示,接下来我们就可以用我们的编译包了

npm ERR! Unexpected end of JSON input while

npm ERR! Unexpected end of JSON input while

4、如果还是不能编译成功,那么最好重新安装配置下node.js,node.js  windows版本可以到官网下载直接安装,如下图所示,我的是windows64位所以下载64位的,下载完成,直接安装即可

npm ERR! Unexpected end of JSON input while

  • VMware如何添加新的虚拟机
  • win11怎么修改用户权限
  • mfc如何多串口编程
  • 如何解决SVN Commit Conflict
  • 如何进行配置xfce4桌面显示设置
  • 热门搜索
    科技报手抄报 夏洛的网手抄报 家乡的手抄报 饮食健康手抄报 手抄报内容资料 备战期中手抄报内容 关于欢度春节的手抄报 小学生安全手抄报大全 廉洁手抄报图片 小学法制教育手抄报