前端npm和yarn更换国内淘宝镜像
NPM
查询当前镜像
npm get registry
设置为淘宝镜像
npm config set registry http://registry.npm.taobao.org/ (旧地址)
npm config set registry http://registry.npmmirror.com/ (最新地址)
设置为官方镜像
npm config set registry http://registry.npmjs.org/
YARN
查询当前镜像
yarn config get registry
设置为淘宝镜像
yarn config set registry http://registry.npm.taobao.org/ (旧地址)
yarn config set registry http://registry.npmmirror.com/ (最新地址)
设置为官方镜像
yarn config set registry http://registry.yarnpkg.com