Skip to main content

Install Yarn on Mac

Published: 2019-10-19

This will install yarn v1.19.1.

  1. Install NodeJS

  2. Download tarball from Yarn downloads

     curl -O -L
  3. Make dir then extract tarball

     mkdir -p ~/bin/yarn
     tar -v -x -C ~/bin/yarn -f yarn-v1.19.1.tar.gz
  4. Set environment variables in your bash config file, e.g. ~/.bash_profile

     export YARN_HOME=$HOME/bin/yarn/yarn-v1.19.1
     export PATH=$YARN_HOME/bin:$PATH
  5. Source bash config file

     source ~/.bash_profile
  6. Confirm installation

     yarn --version

Next: Install Ruby Version Manager (RVM) on Mac
Previous: Install NodeJS and NPM on Mac