方法一:
1,查看当前的下包镜像源
npm config get registry
2,将下包镜像源切换为淘宝镜像
npm config set registry=https://registry.npm.taobao.org/
方法二:
1,通过npm包管理器,将nrm安装为全局可用工具
npm i nrm -g
2,查看当前镜像源
nrm ls
3,将下包的镜像源切换为 taobao 镜像源
nrm use taobao
npm config get registry
npm config set registry=https://registry.npm.taobao.org/
npm i nrm -g
nrm ls
nrm use taobao