Skip to content

Instantly share code, notes, and snippets.

@mshick
Last active April 2, 2020 10:01
Show Gist options
  • Save mshick/306171bf69cf6d901d1332f49b5c4e2d to your computer and use it in GitHub Desktop.
Save mshick/306171bf69cf6d901d1332f49b5c4e2d to your computer and use it in GitHub Desktop.
Installing Node.js with Homebrew and nvm
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install nvm
brew install nvm
# Export nvm environment
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
# Install latest Node.js
nvm install stable && nvm use stable
# Save your nvm env loading into your .bash_profile or similar
if [[ $(brew ls --versions nvm) ]]
then
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
fi
@not-for-me
Copy link

Thanks!

@mlangone
Copy link

thanks

@skekec1
Copy link

skekec1 commented Apr 2, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment