Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gerlie-reyes/14ad75c814b774d2954a363db562edff to your computer and use it in GitHub Desktop.
Save gerlie-reyes/14ad75c814b774d2954a363db562edff to your computer and use it in GitHub Desktop.
NVM Mac OS Install

NVM (Node Version Manager)Mac OS Installation

NVM home

NVM Installation

Install

$ sudo curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Set up path

Input below script into .bash_profile NOTE If you installed zshell, you should input below script into .zshrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

Verify Installation

$ command -v nvm
nvm

or

$ nvm ls

            N/A
node -> stable (-> N/A) (default)
iojs -> N/A (default)

Usage

Show help

nvm --help

Show available node version

nvm ls-remote --lts

Show installed node version

nvm ls

install latest node version

nvm install node

or install specific node version

nvm install v8.11.3

Use specific node version

nvm use v8.11.3

Build alias node version

nvm alias default v8.11.3
nvm alias old v4.4.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment