首页 前端知识 NodeJs之npm、yarn、pnpm设置最新的淘宝镜像下载源

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

2024-08-04 22:08:44 前端知识 前端哥 316 372 我要收藏

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
转载请注明出处或者链接地址:https://www.qianduange.cn//article/14767.html
标签
yarn
评论
发布的文章

RapidJSON介绍

2024-08-14 00:08:38

jQuery 4 beta 震撼发布

2024-08-14 00:08:36

cJSON的使用

2024-08-14 00:08:36

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!