NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源
文章目录
- NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源
- 1. 查看默认的下载源
- 1. npm
- 2. yarn
- 3. pnpm
- 2. 设置最新的淘宝镜像地址
- 1. npm
- 2. yarn
- 3. pnpm
1. 查看默认的下载源
1. npm
C:\Users\jinshengyuan>npm get registry
https://registry.npmjs.org/
2. yarn
C:\Users\jinshengyuan>yarn config get registry
https://registry.yarnpkg.com
3. pnpm
C:\Users\jinshengyuan>pnpm get registry
https://registry.npmjs.org/
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/
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
3. pnpm
# 设置
C:\Users\jinshengyuan>pnpm config set registry https://registry.npmmirror.com
# 查看
C:\Users\jinshengyuan>pnpm get registry
https://registry.npmmirror.com