In order to download Node.js, visit https://nodejs.org/en/download/, where you’ll see the following options:
Installation on Windows and Mac OS is simple as you just have to download and run the appropriate installer and follow the familiar instructions (next, next, next, sure I accept, next, finish ).
If you have brew on your Mac then you can also install Node.js with:
brew install node
In both cases, npm (Node Package Manager – used to install other packages) will be installed along with Node.js.
To verify that you installed Node.js correctly on a Windows machine, run the following command in your Command prompt:
You should get an output similar to: v8.0.0.
To verify that you installed Node.js correctly on your Mac, run the same command as above in your Terminal, and you should get the same similar output as above.
To verify that you have npm install, just run: npm -v and you should get an output similar to: 5.0.1