Gangmax Blog

自由之思想,独立之精神

NVM: Node Version Manager

| Comments

NVM” is the “node.js” equivalent as RVM for Ruby or pyenv for Python. The following code shows how to install and use it.

1
2
3
4
5
6
7
8
9
10
# 1. Install.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
# 2. List all available versions.
nvm ls-remote
# 3. Install a version.
nvm install v6.9.4
# 4. Use a specific version.
nvm use 6.9.4
# 5. Set the default node version if you have multiple versions.
nvm alias default node

More information can be found in the official document here.

Comments