解决npm/yarn/pnpm/nvm下载慢的方法

Jiafeng

分类: Nodejs 420 0

设置改变默认下载地址的方法

npm

// 查看当前下载地址
npm config get registry
// 设置淘宝镜像的地址
npm config set registry https://registry.npmmirror.com/
// 查看当前的下载地址
npm config get registry

yarn

// 查看当前下载地址
yarn config get registry
// 设置淘宝镜像的地址
yarn config set registry https://registry.npmmirror.com/
// 查看当前的下载地址
yarn config get registry

pnpm

// 查看当前下载地址
pnpm config get registry
// 设置淘宝镜像的地址
pnpm config set registry https://registry.npmmirror.com/
// 查看当前的下载地址
pnpm config get registry

nvm

// 设置node镜像
nvm node_mirror https://npm.taobao.org/mirrors/node/
// 设置npm镜像
nvm npm_mirror https://npm.taobao.org/mirrors/npm/
  • 0人 Love
  • 0人 Haha
  • 0人 Wow
  • 0人 Sad
  • 0人 Angry

作者简介: Jiafeng

共 0 条评论关于 “解决npm/yarn/pnpm/nvm下载慢的方法”

Loading...