vue create xxx 报错

在创建项目的时候,无论是默认配置还是自定义的配置,都会出现如下报错;

 不用说,看项目中也只有一个packgge.json文件,项目必然是没有创建成功。

查看淘宝镜像

npm config get registry

原npm地址

npm config set registry http://registry.npmjs.org 

设置淘宝镜像

npm config set registry https://registry.npm.taobao.org

取消淘宝镜像

npm config delete registry

总之,这么操作了一番,依然没有效果,然后

sudo vue create 项目名

加上sudo就创建成功了。。。

原文地址:https://www.cnblogs.com/wang715100018066/p/12036028.html