Toggle nodejs versions

There has been a number times when I tried new frameworks or templates that depend on specific version of nodejs. When this happens I’m faced with skipping on the idea or messing around with my install version of nodejs, and inavertantly causing issue for some of my other projects.

A simple solution

nvm - Node Version Manager

Allows easy installations and toggling of nodejs versions

Linux Install nvm

1
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Windows Install nvm

Find the latest release from the NVM Github page
Download the nvm-setup.exe and run it on you local computer.

Install nodejs version

1
2
nvm install 12
nvm install 14

Toggle current nodejs version

1
nvm use 14