首先检查npm代理,是否已经使用国内镜像
//
执行以下命令查看是否为国内镜像
npm config get registry
![](https://i-blog.csdnimg.cn/direct/f91c2e6b471e4e7d98494c2c9dce57e1.png)
如果不是则换成国内镜像,执行以下命令
npm config set registry=https://registry.npmmirror.com
//执行以下命令查看是否配置成功
npm config get registry
成功!!!
//
执行以下命令查看是否为国内镜像
npm config get registry
如果不是则换成国内镜像,执行以下命令
npm config set registry=https://registry.npmmirror.com
//执行以下命令查看是否配置成功
npm config get registry
成功!!!