安装

文档 https://www.yarnpkg.cn/getting-started/install

仓库 https://github.com/yarnpkg/berry

npm install -g yarn

切换到 Yarn 新稳定版。

yarn set version stable

修改源

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

设置包路径

yarn config set global-folder D:\Packages\yarn

代理

yarn config set proxy <HTTP 代理监听地址>
yarn config set https-proxy <HTTP 代理监听地址>