1、连接网络,确保网络畅通。

2、键盘按win+r快捷键, 输入cmd, 打开dos命令窗口。

3、npm get registry查看当前镜像源。

4、输入npm config set registry xxx(镜像源地址)。
npm config set registry https://registry.npm.taobao.org,设置为国内淘宝镜像。

5、npm镜像源设置完成,已经设为国内镜像。

1、1. npm config set registry https://registry.npm.taobao.org 设置为国内淘宝镜像。。