Mac安装yarn方法curl -o- -L https://yarnpkg.com/install.sh | bash
错误信息为配置环境变量
> WARNING: GPG is not installed, integrity can not be verified!
> Extracting to ~/.yarn...
> Adding to $PATH...
> Profile not found. Tried (as defined in $PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
> Create one of them and run this script again
> Create it (touch ) and run this script again
OR
> Append the following lines to the correct file yourself:
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
1.在终端内执行 vim /etc/profile
2.将错误信息最后一行的路径提示放在文件中
3.:wq保存退出
4.如果遇到Can't open file for writing提示 使用超级命令 sudo vim 再次进入编辑即可