npm ERR! Unexpected end of JSON input while parsing near ‘...“:“^1.2.0“,“vue-html-‘ npm ERR! A comp
当我们出现这样的错误:解决办法:
·
当我们使用vue-cli脚手架创建项目的时候,出现了这的问题,这是npm下载出错了。
错误提示:
Vue CLI v4.5.9
Creating project in C:\Users\lenovo\Desktop\ffff\hello.
Installing CLI plugins. This might take a while...
npm ERR! Unexpected end of JSON input while parsing near '...":"^1.2.0","vue-html-'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lenovo\AppData\Roaming\npm-cache\_logs\2020-12-14T13_40_02_550Z-debug.log
ERROR command failed: npm install --loglevel error
解决办法:
注意:以管理员身份运行cmd,输入下面的指令。
1.清除缓存
npm cache clean --force
2.重新安装
npm install
然后再重新创建项目即可。
看完如果对你有帮助,感谢点赞支持!
如果你是电脑端,看到右下角的 “一键三连” 了吗,没错点它[哈哈]
加油!
共同努力!
Keafmd
更多推荐
所有评论(0)