ZL
About Articles Contact
Published on May 25, 2022
Filed under:
#node

Best way to install Node and keep it up to date

The easiest way to install Node is head over to NodeJS’s website and download the LTS version.

The LTS Version is good enough for most users. I use LTS myself.

The Current version is the latest available version. Developers will be making changes and creating libraries on this version. If you use Current, be prepared to run into bugs.

Once you downloaded and installed Node, you should be able to use the node command and the npm command. You can add -v to each of these commands to see their respective versions.

Terminal window
node -v
npm -v

Upgrading and Downgrading Node with a Package Manager

You want to have the flexbility to upgrade and downgrade Node easily if you’re going to work with Node.

The simplest way is to use npm (node default package manager), to install a package n. n lets install a specific version of Node easily.

You can install n with the following command.

Terminal window
sudo npm install n -g

The -g flag here stands for global. It lets you use the n command everywhere.

Once you have installed n, you can use the following commands to install different versions of Node.

  • sudo n lts — installs the LTS version
  • sudo n latest — installs the latest version
  • sudo n install <num> — Installs a specific version on Node. Here, you only need to provide the first number. (To get the latest version of 16.xx.yy, you can simply write 16).
Note

Node’s version numbers are written with a standard called Semver. You can find out more about Semver in this article

Using other package managers

You’re not limited to using n to upgrade or downgrade Node. There are other package managers available and you can choose the one you like.

Previous When building components in Astro, you might not want to use Astro files Next Finding my roots in my business

Join My Newsletter

I share what I’m learning on this newsletter: code, building businesses, and living well.

Sometimes I write about technical deep-dives, product updates, musings on how to live, and sometimes my struggles and how I’m breaking through.

Regardless of the type of content, I do my best to send you an update every week.

If you’re into making things and growing as a person, you’ll probably feel at home here.

“

Zell’s writing is very accessible to newcomers because he shares his learning experience. He covers current topics and helps all readers level up their web development skills. Must subscribe.

Chen Hui Jing
Chen Hui Jing — Web Developer
The Footer

General

Home About Contact Testimonials Tools I Use

Projects

Magical Dev School Splendid Labz

Socials

Youtube Instagram Tiktok Github Bluesky X

Follow Along

Email RSS
© 2013 - 2025 Zell Liew / All rights reserved / Terms