一、npm设置淘宝镜像
1.查询当前配置的镜像
npm get registry
2.设置成淘宝镜像
npm config set registry http://registry.npm.taobao.org
3.换成原来的
npm config set registry https://registry.npmjs.org
二、yarn设置淘宝镜像
1.查询当前配置的镜像
yarn config get registry
2.设置成淘宝镜像
yarn config set registry http://registry.npm.taobao.org