How to easily update Node.js (works on all platforms)

Updating software can sometimes be as simple as writing a command and hitting enter. Unfortunately, that’s not the case for updating Node.

Check your current version of Node:


node --version

Updating Node.js without the hassle

Let me first give you the manual but quick update Node.js workaround that appears to work for everyone:

  • Go to the official Node.js website and download the version on the left called “recommended for most users” if you want the most stable version.
  • Install it.
  • You’re done!

Easy huh? No 3rd party software required, no restart, and it takes around 60 seconds.

Want to update Node via the command line?

To update Node via your terminal (command line) as a Windows, Mac, or Linux user, you can’t use the exact same formula. It appears to be especially hard for Windows users to find a consistent solution.

First, you have to figure out which operating system you’re on, and then there’s a myriad of different ways you can install it on Mac, Windows, and Linux, depending on whether you’re using NPM, NVM, or something else.

You also need to be careful that you pick the right Node.js installer. Do you need the latest recommended for most users version (probably)? Or the actual latest version with the newest features (unlikely)?

Be careful you don’t install the wrong version. Often nothing bad happens but sometimes it can cause unpredictable bugs (frustrating for a beginner) that you then have to spend time on solving.

Instead of listing every possible scenario here, I’d advise that you go to this thread.

There are at least 15 solutions, and chances are you’ll find the solution to your setup.

Orrr... save your time and go to the Node.js website and install the damn thing the good old-fashioned way.

The above has worked for me every single time, on both Mac and Windows.

Seriously, sometimes I can’t be bothered with this command line stuff.

Any questions? Let me know, I’ll answer everybody! :-)


Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊

Kofi

Share & Discuss on