返回顶部
本页目录

淘宝镜像

Yarn设置淘宝镜像

Yarn2

  • 命令行修改
                                
    • yarn config set npmRegistryServer https://registry.npm.taobao.org/
  • .yarnrc.yml
                                
    • npmRegistryServer: "https://registry.npmmirror.com"

Yarn(V1)

1.查询当前配置的镜像

                            
  • yarn config get registry // 默认:https://registry.yarnpkg.com

2.设置成淘宝镜像

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

3.换成原来的

                            
  • yarn config set registry https://registry.npmjs.org/