I\'m working with Yarn v0.16.1. If I understand correctly (according to the documentation), yarn global add should be the equivalent of np
Here's the process I used on Mac OSX El Capitan.
Like this:
curl -o- -L https://yarnpkg.com/install.sh | bash
It will display something like this:
Installing Yarn!
> /Users/{Your Username}/.yarn already exists, possibly from a past Yarn install.
> Remove it (rm -rf /Users/{Your Username}/.yarn) and run this script again.
Do not remove it. Move on to step 2.
Copy the directory listed above. Open your profile. I'm using zsh. So mine was ~/.zshrc. You can find yours and more info here.
Copy the following (replacing your directory and username details as necessary, the one you got from the installation error message).
alias yarn="/Users/{Your Username}/.yarn/bin/yarn"
yarn version to check if its working. If it is, you should see a version number displayed in your terminal.That's it, and what worked for me.