Install Node JS in MAC using Terminal

Profile picture for user devraj

Node.js is an open source server environment which runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.). It uses JavaScript on the server.

Node.js runs single-threaded, non-blocking, asynchronously programming, which is very memory efficient.

Node.js can generate dynamic page content. It can manipulate files on server and collect data.

To install node js and npm on Mac follow steps:

Step 1: Type below command

$ brew install node

Step 2: Type below 2 commands if you are getting link error

$ brew link node
$ rm /usr/local/share/systemtap/tabsep/node.stp

Step 3: Verify node installed by typing below command

$ node -v
$ npm -v

Uninstall Node

$ brew uninstall node
$ brew autoremove

Update Node

$ brew update
$ brew upgrade node