Using nvm

If you're working on more than one projects or you need to switch to your old project there is a chance you will have to change your node.js version. There might be a few dependecnies that will work only on a specefic node.js version. Use nvm to change your node.js versions.

If you already do not have nvm installed. Downlaod and install the latest version of nvm.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

Check your nvm version by nvm --version

To download and install new version of node.js run nvm install 8.2 . Replace 8.2 with the version number you need.

To check what versions of node.js are installed on your system run nvm ls. This will list out all the versions you have installed.

To switch to any node.js version you need use nvm use 8.2

If you do not want any particular node.js version you can uninstall it by nvm uninstall 8.2

You can set the default node.js version by setting an alias nvm alias default v9.3.0

Using nvm
Share this