Unexpected end of JSON input while parsing near
程序员文章站
2022-07-03 08:42:31
...
Unexpected end of JSON input while parsing near '...benchpress":"2.0.0-be'
异常分析
一、今天需要安装create-react-app
,但是出现异常了,使用命令:npm install --global create-react-app
的时候报错:
npm install --global create-react-app
npm ERR! Unexpected end of JSON input while parsing near '...benchpress":"2.0.0-be'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\80992399\AppData\Roaming\npm-cache\_logs\2020-06-03T06_39_09_316Z-debug.log
二、一开始以为是代理的问题,因为公司的网络需要设置代理才能连接到外网的,所以重新设置了代理,但是发现没有效果。需要设置代理的卡伊参考这篇文章:https://blog.csdn.net/jim_LoveQ/article/details/106383707
三、在*上找到一个答案,说是清除npm缓存就可以的了,使用下面的命令清除了缓存,然后就可以了。
npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
npm install --global create-react-app
C:\Users\80992399\AppData\Roaming\npm\create-react-app -> C:\Users\80992399\AppData\Roaming\npm\node_modules\create-react-app\index.js
+ create-react-app@3.4.1
added 98 packages from 46 contributors in 22.78s
三、要是还不行可以使用下面的命令,就是清除缓存后更新一下。
npm cache clean --force
npm update
还是不行可以查看*的这篇文章:NPM Install Error:Unexpected end of JSON input while parsing near ‘…nt-webpack-plugin“:”0’
四、总结:这次的Unexpected end of JSON input while parsing near '...benchpress":"2.0.0-be'
就到这里结束了,如果有疑问可以直接留言评论,如果觉得对你有帮助,可以小小的赞赏一杯奶茶钱,谢谢!!
推荐阅读
-
记录微信小程序报错 Unexpected end of JSON input;at pages/flow/checkout page getOrderData function
-
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错误