淘宝npm镜像

淘宝npm镜像:http://npm.taobao.org/

 yarn config set registry https://registry.npm.taobao.org

1.临时使用

npm --registry https://registry.npm.taobao.org install express
2.持久使用

npm config set registry https://registry.npm.taobao.org

// 配置后可通过下面方式来验证是否成功
npm config get registry
//
npm info express

 

安装 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:
npm install -g cnpm --registry=https://registry.npm.taobao.org

安装完成之后使用cnpm安装模块
cnpm install [name]

 

nvm 设置淘宝镜像

设置npm_mirror:
nvm npm_mirror https://npm.taobao.org/mirrors/npm/

设置node_mirror:
nvm node_mirror https://npm.taobao.org/mirrors/node/

 

相关文章:

  • 2022-12-23
  • 2021-07-10
  • 2022-01-11
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2021-07-16
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2021-06-13
相关资源
相似解决方案