Last Updated: February 25, 2016
·
1.022K
· magalhini

Upgrading node.js from within NPM

There's an easy and clean way to upgrade your node.js version without having to download the newest package - via npm itself!

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

Then check is everything went as expected:

node -v

Credits to David Walsh: http://davidwalsh.name/upgrade-nodejs

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside