JavaScript Answers

How to install a specific version of Node on Ubuntu?

Spread the love

To install a specific version of Node on Ubuntu, we use the n module.

For instance, we run

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

to clear the npm cache with

sudo npm cache clean -f

Then we install the n module globally with

sudo npm install -g n

We run n with

sudo n stable

Then we install Node 16.15.1 with

sudo n 16.15.1

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *