In the past, updating Node.js was not straightforward as you had to install third-party software and run command lines which can be confusing and introduce bugs to your projects.
Nowadays, It’s easy to update Node.js to the latest version, and all you need to do is reinstall the Node.js again. This approach will update your current Node.js version to the latest one, and best of all, it works for all operating systems.
Before you begin, check the current version you have by running this in your terminal:
Alright, let’s begin updating Node.js:
Step-1: Go to the official Node.js website by typing “nodejs.org” on Google search. Step-2: Click the download button (I recommend LTS). It will begin downloading the file immediately.
Step-3: When the download is complete, click the file and follow the on-screen instructions to complete the installation process.
Step-4: When the installation is complete, check your current version by running
node -v on the terminal. As of 21 July 2021, the latest LTS (Long Term Support) version is 14.17.3.
And that’s it! Enjoy building your project with the latest Node.js version.