Upgrading Node.js to latest version

npm install n -g

For the latest stable version:

n stable

For the latest version:

n latest