npm ERR! Unexpected end of JSON input while

2025-04-20 07:51:01

1、今天用npm编译时候报蕾蓄允嘞错:C:\Users\king\vue-devtools>npm installnpm 呶蓟鹭毵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
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢