方法一步骤:
1.安装nrm工具
npm i nrm -g
2.查看所有可用的镜像源
nrm ls
3.切换镜像源为淘宝
nrm use taobao
方法二步骤:
1.查看当前的下包镜像源
npm config get registry
yarn config get registry
2.切换到淘宝镜像源
npm config set registry https://registry.nommirror.com/
yarn config set registry https://registry.nommirror.com/
3.检查是否成功切换为淘宝镜像源
npm config get registry
yarn config get registry