EDDYMENS

Published a year ago

How To Install Different Versions Of NodeJS

There are many reasons why you might need a different version of NodeJS.

For instance, running an app that relies on an older version of NodeJS.

NVM [↗] is a NodeJS version manager that makes it possible to do just that.

Installing NVM

Follow this section of the ReadMe [↗] doc to install NVM.

Installing a specific version of NodeJS

Let's say we would like to install version 12 of NodeJS. We would run the following command to do so:

$ nvm install 12

Once you have different versions of NodeJS installed you can switch between them using the command below:

$ nvm use 12

You can also check which version of NodeJS you are running at any point in time:

$ node -v

Here is another article you might like 😊 How to refresh a Laravel 10 Tinker Session