1、查看当前源
yarn config get registry
2、切换为淘宝源
yarn config set registry https://registry.npm.taobao.org
3、切换为自带的
yarn config set registry https://registry.yarnpkg.com
npm 切换淘宝镜像
npm config set registry http://registry.npm.taobao.org
yarn config get registry
yarn config set registry https://registry.npm.taobao.org
yarn config set registry https://registry.yarnpkg.com
npm 切换淘宝镜像
npm config set registry http://registry.npm.taobao.org