npm
查看当前镜像
npm config get registry
设置淘宝镜像
npm config set registry https://registry.npmmirror.com
切回原镜像
npm config set registry https://registry.npmjs.org
yarn
查看当前镜像
yarn config get registry
设置为淘宝镜像
yarn config set registry https://registry.npmmirror.com
切回原镜像
yarn config set registry https://registry.yarnpkg.com
pnpm
查看当前镜像
pnpm config get registry
设置为淘宝镜像
pnpm config set registry https://registry.npmmirror.com
切回原镜像
pnpm config set registry https://registry.npmjs.org