Update Node.js using the terminal

nodejs-logo

These are just the steps to update Node.js by using your terminal:

sudo npm cache clean -f
sudo npm install -g n

The n package represents a Node helper, and running this command upgrades node to the latest stable version.

sudo n stable

Just to confirm we can check our version:

node -v

// Output
v6.3.1

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *