How do I install the the latest version of nodejs?

nodejs

#1

When I install nodejs using npm install node.js --save, I’m only getting version 4.6.1. I’m trying to use nodemailer but I’m told I need v6.0.0 or higher - how do I upgrade?


#2

use nvm

nvm install 6
nvm alias default 6

#3

Brilliant! Thank you!