The best way to install and upgrade your yarn version to 1.16.0 version on macos |June,02,2019
step one:
open your terminal , and delete files
rm -f /usr/local/bin/yarnpkg
rm -f /usr/local/bin/yarn
step 2: remove cache
rm -rf ${HOME}/.yarnstep 3: remove some variable if these variables exist
export PATH="$PATH:`yarn global bin`"
step 4: install yarn by curl command
curl -o- -L [url=https://yarnpkg.com/install.sh]https://yarnpkg.com/install.sh[/url] | bash
you will see these
so check your yarn version on your computer
$ yarn -v
1.3.2
No Worries,let's continue, type this command again
curl -o- -L [url=https://yarnpkg.com/install.sh]https://yarnpkg.com/install.sh[/url] | bash
step 5. add this command
export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin"
Now, you can type yarn -v to check your yarn version would be 1.16.0