Installing node on Mac require brew (Homebrew). If you have not installed it, you can follow Brew installation guide. Here are the steps to install node on Mac on command line.
-
Install node
$ brew install node
-
In case you need to upgrade already installed node
$ brew upgrade node
-
Print info about installed package
$ brew info node node: stable 5.5.0 (bottled), HEAD Platform built on the V8 JavaScript runtime to build network applications https://nodejs.org/ ... ...
-
List installed files
$ brew list -v node
-
Check the installation
$ node --version v5.5.0 $ npm --version 3.5.3
-
Self update npm to latest version as npm installed along with node may not be latest.
$ npm update -g npm