npm
查看当前镜像
npm get registry
切换淘宝镜像
npm config set registry http://registry.npm.taobao.org/
设置为官方镜像
npm config set registry https://registry.npmjs.org/
yarn
查看当前镜像
yarn config get registry
切换淘宝镜像
yarn config set registry http://registry.npm.taobao.org/
设置为官方镜像
yarn config set registry https://registry.yarnpkg.com