npm ERR! Unexpected end of JSON input while

 时间:2026-04-21 21:58:37

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桌面显示设置
  • 热门搜索
    濒临的意思 大满贯是什么意思 乘风破浪的意思 什么是皈依 须眉是什么意思 惨绝人寰的意思 如怨如诉的意思 会计的作用 应验的意思是什么 异曲同工的意思