首先安装brew
# 使用如下命令安装快
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
方案一:使用homebrew安装yarn
brew install yarn
方案二:使用npm安装yarn
# 首先安装nodejs和npm
brew install node
# 再使用npm安装yarn
npm install -g yarn
vue-cli-service: command not found解决
sudo npm install cnpm -g --registry=http://registry.npm.taobao.org
# 再执行命令
sudo rm -rf node_modules package-lock.json && npm install
# 再执行运行命令
npm run serve或npm run dev
npm清除缓存
npm cache clean --force
安装wget
yum install -y wget