当前位置:   article > 正文

NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源_node最新淘宝镜像

node最新淘宝镜像

NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源

1. 查看默认的下载源

1. npm

C:\Users\jinshengyuan>npm get registry
https://registry.npmjs.org/
  • 1
  • 2

2. yarn

C:\Users\jinshengyuan>yarn config get registry
https://registry.yarnpkg.com
  • 1
  • 2

3. pnpm

C:\Users\jinshengyuan>pnpm get registry
https://registry.npmjs.org/
  • 1
  • 2

2. 设置最新的淘宝镜像地址

淘宝镜像源地址由 https://registry.npm.taobao.org 已替换为https://registry.npmmirror.com

1. npm

# 设置
C:\Users\jinshengyuan>npm config set registry https://registry.npmmirror.com
# 查看
C:\Users\jinshengyuan>npm get registry
https://registry.npmmirror.com/
  • 1
  • 2
  • 3
  • 4
  • 5

2. yarn

# 设置
C:\Users\jinshengyuan>yarn config set registry https://registry.npmmirror.com
yarn config v1.22.22
success Set "registry" to "https://registry.npmmirror.com".
Done in 0.03s.
# 查看
C:\Users\jinshengyuan>yarn config get registry
https://registry.npmmirror.com
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

3. pnpm

# 设置
C:\Users\jinshengyuan>pnpm config set registry https://registry.npmmirror.com
# 查看
C:\Users\jinshengyuan>pnpm get registry
https://registry.npmmirror.com
  • 1
  • 2
  • 3
  • 4
  • 5
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/运维做开发/article/detail/996677
推荐阅读
相关标签
  

闽ICP备14008679号