How to install node.js in Mac?

1. Node.js installation using homebrew

If you already have it installed on your computer, you can skip the next few steps, otherwise, proceed.

To check if your Mac already have node install or not run following command

$ node -v

We’ll install Node.js using Homebrew This isn’t the only way to install Node but I find that Homebrew is great as a package manager. With it you can easily install the latest as well as specific versions of a package, have different versions of a package, select which version to use, update and uninstall packages, e.t.c. To install Homebrew, go to their website and follow the instruction at the top of the page.

*Homebrew is MacOSX only command line installer application and it doesn’t exist for Windows.

Follow the following command to install Homebrew

  1.  If you have already Homebrew installed
$ brew update

OR 1. If you don’t have Homebrew installed, To install Homebrew run following command in terminal (this link may change so better copy from their website)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After Homebrew is installed, install Node.js by pasting the following in a Terminal window.

$ brew install node

 

2. Node.js installation

You can also Download the latest version of Node.js.

One thought on “How to install node.js in Mac?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s