Using nvm
What is nvm?
nvm is a Node Version Manager. It's perfect for running multiple versions of Node.js on the same machine.
Installing nvm
warning
If you've already installed Node.js on your machine, uninstall Node.js before installing nvm. This will prevent any conflicts between the Node.js and nvm.
If you're on a Mac
You can uninstall by running the following command in your terminal:
brew uninstall --force node
Once that's finished, run the following command to remove unused folders and dependencies:
brew cleanup
If you're on Windows
- Go to the start menu, search and go to Settings
- Click on the Apps section
- In the search box under Apps & Features section, search for Nodejs
- Click on Nodejs and click on Uninstall
- We recommend restarting your machine, even if you're not prompted to do so
If you're on a Mac
You can install nvm
using Homebrew:
brew install nvm
If you're on Windows
Reference the nvm-windows repo.
- Download the latest installer (nvm-setup.zip)
- Locate your zip file (should be in your downloads or wherever you've configured your downloads to be saved) and unzip/extract its contents
- Now, you should have a file called nvm-setup.exe. Double click on it to run the installer.
- Follow the instructions in the installer
info
We have a specific doc for Windows Development Setup.
How to use nvm
To confirm that nvm
was installed correctly, run the following command in your terminal:
nvm --version
You should see the version number of nvm
printed to your terminal.