vue npm安装webpack报错:Unexpected end of JSON input while parsing near
程序员文章站
2022-07-03 08:42:25
...
搭建一个vue项目,安装webpack和vue-cli时一直报错:
网上搜了大多数解决方案都是清空npm缓存:
npm cache clean --force
但是我试了很多次,都是报错。
好不容易看到一个方法,说法是:出现这种错误是因为node和npm的版本不合适,于是需要降低一下npm的版本。
输入如下命令:
npm -g i aaa@qq.com
接下来,试了下安装webpack,竟然可以安装成功了:
推荐阅读
-
Unexpected end of JSON input while parsing near错误
-
亲测解决npm ERR! Unexpected end of JSON input while parsing near...的方法
-
npm ERR! Unexpected end of JSON input while parsing near
-
npm ERR! Unexpected end of JSON input while parsing near '...Rg9e9zaVBZ
-
“Unexpected end of JSON input while parsing near···”错误解决方案
-
解决npm ERR! Unexpected end of JSON input while parsing near的报错问题
-
Unexpected end of JSON input while parsing near
-
vue npm安装webpack报错:Unexpected end of JSON input while parsing near
-
Unexpected end of JSON input while parsing near错误
-
npm install出现Unexpected end of JSON input while parsing near错误解决方法