在使用vue-cli 3.x脚手架工具创建项目时出现以下错误:command failed: npm install --loglevel error
如图:

我的解决方法:
1.首先先清除npm缓存,命令为 npm cache clean --force
2.通过以下路径找到一个文件名为“.vuerc”的文件,可以通过记事本的方式打开它,并将里面的 “useTaobaoRegistry”: false,
改为**“useTaobaoRegistry”: true**,然后保存即可
3.操作下图所示:


所有评论(0)