Install Node.js on Mac OS X and Windows
For Mac OS X
Via Installer
Go to Download page on Node.js and click on Macintosh Installer box. This will start down downloading Node installer for mac.
The downloaded file will be named node-v<version-no.>.pkg
.
Please check out last section of tip to verify the installation
Via Homebrew
If you using Homebrew, then installing the node is breeze with just following command -
brew install node
I recommend using brew
because it always keeps latest version of node available and updating same just running brew update node
.
Please check out last section of tip to verify the installation
For Windows
Go to Download page on Node.js and click on Windows Installer box. This will start down downloading Node installer for mac.
The downloaded file will be named node-v<version-no.>-<architecture-type>.msi
.
Please check out last section of tip to verify the installation
Installation via NVM module
Refer to my previous tip for installation using NVM.
This will work for both Mac and Windows.
Check for successful installation
After successful download of the file, click to run the installer for same. Follow the instructions given installer to complete the installation. After installation, you will have Node and NPM installed on your machine. and node
and npm
commands will be available via command line.
Verify successful installation by checking-
node -v
npm -v
On successful installation, it will print out the respective versions for same.