HomeAbout MeContact

How to Update Node.js Version on Mac?

By Mayank Patel
Published in Node.js
November 29, 2021
1 min read
How to Update Node.js Version on Mac?

Here we will get some easiest and prominent ways to update Node.js in Mac. Knowing the concept is important because, in NPM, few latest JavaScript libraries need the recent version of Node.js.

Check out the steps now.

Step 1: The initial step is to check the version of Node.js by opening the console.

$ node -v
v x.x.x

Step 2: If you did not install n package till now, install it using NPM.

 $ sudo npm install -g n

Step 3: Afterward, you will be able to update the Node.js to the desired version.

(If you want to install stable version so use this command to install the stable node release.)

$ sudo n stable

(If you want to install latest version so use this command to install the latest node release.)

$ sudo n latest

(If you want to install LTS version so use this command to install the LTS node release.)

$ sudo n lts

(If you want to install custom version so use this command to install the custom node release.)

$ sudo n 14.18.1

Step 4: We are done! Now you can check the version of Node.js again from the console to get assured.

$ node -v
v x.x.x

Tags

Node.JSMacNode.js Version on Mac
Previous Article
How to create MongoDB view in Loopback4?
Mayank Patel

Mayank Patel

Software Developer | Ideator | CEO

Topics

React
Node.js
MongoDB - Loopback4
Server Configuration
Server Installation
© 2022, All Rights Reserved.

Quick Links

Reach me outAbout UsContact Us

Social Media