Installing Node JS Latest in Ubuntu & Debian
Ubuntu and Debian systems apt
provides an ancient version of Node JS that doesn't have the features required by modern Ruby on Rails applications. When I looked into the Node JS website on how to install the latest, I had to go through link after link to get to a place that had the info. Here it is in one page:
First of all, let's install and update the snap core.
sudo snap install core; sudo snap refresh core
Then we need to decide what version we want. I wanted Node JS v16. Node JS Snap is prepared in such a way that you have to use the version as the channel. So if you want to install Node JS v16.x you would:
sudo snap install node --classic --channel=16
Note: DevOps engineers and Linux System Administrators who use Chef
for infrastructure as code should note that the chef snap_package
is not going to work with channels like this. They only support the standard types.
About the Author
Ziyan Junaideen -
Ziyan is an expert Ruby on Rails web developer with 8 years of experience specializing in SaaS applications. He spends his free time he writes blogs, drawing on his iPad, shoots photos.