CNVM is the best command line tool for switching and installing node versions! It makes managing multiple versions of Node.js a breeze! Just execute one command and everything is done!
-
Download the prebuilt binary here
-
Add the node binaries directory to the path using the .bashrc file (if you use bash) or .zshrc if you use zsh. This folders should be located in your home directory
# If you haven't change anything this dir will be ~/.nodejs/bin
export PATH="/home/<yourname>/.nodejs/bin:$PATH"
- Move the binary to the /bin directory
# Assuming the binary downloaded to "Download" directory
mv ~/Downloads/binary ~/bin/cnvm
-
Download the prebuilt executable here
-
Move the downloaded executable to any folder you want
-
Now add C:\users<your_name>.node.js (assuming you will not change the path during the node installation process) and the directory you moved the executable to, to the PATH. In case you don't know how to add folders to PATH on windows, use this guide.
Option | Description | Type | Default | Required? |
---|---|---|---|---|
-v |
Specify version to work with. | String |
Nothing | Yes |
-c |
Specify path to cnvm folder (this folder does contain all installed versions of node). | String |
false |
No |
Install a new version of node.js that is not currently on your system.
cnvm install -v <version>
Switch to a different Node version, the version must be installed before switching to it.
cnvm switch -v <version>
Uninstall specific Node version from your system, a switch will be automatically used to switch to latest stable version.
cnvm uninstall -v <version>
If you want to contribute, please open an issue first and dicuss the changes you want to make in detail. Thanks!
CNVM
is free and open-source software licensed under the GNU General Public License 2.0.