Bookmark and Share
  • Install Homebrew.

  • Install Node:

      brew install node
  • Install NVM:

      brew install nvm

You should create NVM's working directory if it doesn't exist:

mkdir ~/.nvm

Add the following to ~/.zshrc or your desired shell configuration file:

export NVM_DIR="$HOME/.nvm" . "$(brew --prefix nvm)/"

You can set $NVM_DIR to any location, but leaving it unchanged from /usr/local/Cellar/nvm/0.31.1 will destroy any nvm-installed Node installations upon upgrade/reinstall.

Type nvm help for further information.

Bash completion has been installed to: /usr/local/etc/bash_completion.d

    source $(brew --prefix nvm)/
blog comments powered by Disqus