How to upgrade Node.js

Believe or not this information was not easy to find.

Here how to upgrade your Node.js version ;)

Your current Node.js version

Run the following command to know what version you have installed.

You can check what’s the last version available on the official Nodejs.org website

node -v

Before upgrading, clean the cache

sudo npm cache clean -f

Install ‘n’

You need this to run the upgrade command:

(skip to next step if you already have it)

sudo npm install -g n

Upgrade Node

To the last stable version:

sudo n stable

To a specific version:

sudo n 0.8.11
No comments yet, leave yours!

Leave a Reply

Add <code> Some Code </code> by using this tags.