Skip to content

Instantly share code, notes, and snippets.

@khell
Last active September 29, 2017 09:11
Show Gist options
  • Save khell/a3a27254b5145e51cedfe31d947cc318 to your computer and use it in GitHub Desktop.
Save khell/a3a27254b5145e51cedfe31d947cc318 to your computer and use it in GitHub Desktop.
Setup Node via NVM and Yarn via Homebrew on macOS
# Setup NVM
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# Install latest version of Node
nvm install node
nvm use node
# Setup Yarn and use the correct global bin directory
brew install yarn --without-node
yarn config set prefix $(npm config get prefix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment