How to install node (node.js) on Mac

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.

  1. Install node

    $ brew install node
    
  2. In case you need to upgrade already installed node

    $ brew upgrade node
    
  3. 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/
    ...
    ...
    
  4. List installed files

    $ brew list -v node
    
  5. Check the installation

    $ node --version
    v5.5.0
    $ npm --version
    3.5.3
    
  6. Self update npm to latest version as npm installed along with node may not be latest.

    $ npm update -g npm
    
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments