1. mac 安装 brew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
参考地址:https://blog.csdn.net/yuanshangshenghuo/article/details/106599836
2.brew安装yarn
brew install yarn
参考地址: yarn 中文文档