Upgrade Node.js to the latest version on Mac OS (without brew)

Here’s how I successfully upgraded a latest version without any other requirements like brew etc

Step 1:

sudo npm cache clean -f

Step 2:

sudo npm install -g n

Step 3:

sudo n stable 

Note step 3: stable can be exchanged for latestlts (long term support) or any specific version number such as X.XX.XX.

If the version number doesn’t show up after typing 

node -v

you might reboot.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s