How to set default node version with NVM

Date: 29-05-2021

Step 1: Login to the server via ssh.

Step 2: Install the required version by using below nvm command.
# nvm install v12.19.1
Note: 12.20.1 – This is version.

Step 3: Set 12.19.1 (or another version) as default.
# nvm alias default v12.19.1

Step 4: Restart the server and verify the default node version by using below command
# node -v
# node –version

Thank you!

Leave a Reply