Npm Yarn Pnpm 设置国内镜像

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

你可能感兴趣的:(npm,yarn,node,npm,前端,yarn,node.js)