Tag homebrew

Read about the posts of tag homebrew

Is the perfect packet manager for Mac OS X system.

Node.js is actually an essential tool for every developer. Basically are a javascript interpreter for a command line. This is very interesting because allows executing javascript in any environment; you can make server-side applications, command-line tools, webs, etc. An actually have a lot of followers, apps, frameworks to work with it. This ecosystem is incredible and make it easier life when you work with it.

 

But Node isn’t alone. Come with another powerful tool called npm. Npm is a package manager that allows installing of third party libraries in javascript. For development, this is amazing because you could have an entire development environment in minutes.

Let’s do install Node.

Install Node

you have two ways to install in Mac OS X.

Use Installer

The easiest way to install a node is with the package manager.

  1. Go to https://nodejs.org/en/download/
  2. Download Mac installer version
  3. Execute and follow step by step

Use Homebrew

Homebrew is defined as a package manager that OS X should have. First, we need to install homebrew. Open a terminal window and write:

After some text, you can test it works:

Now we can install Node:

And after some more text, you will be Node.JS installed.

Test It

If you open a terminal and write:

You will have the version output:

Why use Homebrew instead Installer

Why is better to use homebrew instead of the installer? Easy, you need administrative privileges to install, this means use Sudo to install with package installer and are a big problem for working with it. You will need to use Sudo in front of the node and this one doesn’t like execution with root privileges. To avoid this problem use Homebrew to install it.