macOS Quick Start
Explore how to install essential development tools on macOS, including Homebrew, Git, and Node, to set up an efficient environment for developing mobile applications with Ionic and React. Understand different installation methods and make informed choices for your setup.
We'll cover the following...
If you use a Mac, this lesson will show you how to install the tools you are going to need. If you are not using a Mac, feel free to skip ahead to the next lesson.
Homebrew
On a Mac, most of the tools you need to install can be installed through Homebrew. Homebrew is Mac’s missing package manager.
There are a lot of tools and runtime packages available through Homebrew, so I recommend installing it if you do not already have it. You can install it by copying and pasting the following command into any terminal window.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Git
Next, you should install Git. But first, check to see if you have it. In a terminal window, enter the command:
git --version
If it is installed, you will see a version number, probably 2.x or something. If you have a version that says, “Apple Git,” it means you installed it through the XCode command-line tools. This should work fine.
If you do not have Git, and you installed Homebrew, simply issue the command:
brew install git
This will give you the latest version for your system.
If you prefer to install Git from the official site, you can do that, too. Head over to https://git-scm.com, click the download button, and follow the instructions.
Node
Next, tackle Node. There are three ways to install Node. Each is valid and has its own positives and negatives. I will try to give you enough information for you to make an intelligent choice. Review them and choose the one you prefer.
If you like installing items from their source, feel free to head over to https://nodejs.org and click the big green button. The tools you are going to be using require at least Node 8, so you should not have any issues here. I recommend downloading and installing the long-term-support version (LTS).
Node (Homebrew)
You can also use Homebrew to install Mode. Simply enter the following command in a terminal window.
brew install node
While it is installing, I would like to point out a few things that you will see. The first thing Homebrew tries to do is update its local indexes. This is how it knows what software is available. The massive amount of text that fills the screen are all new or updated software packages that Homebrew has found since the last time it was run on this system.
Homebrew then finds node and its dependencies. It continues to download and install the dependencies, and finally, it installs Node itself.
After a short while, Node is installed.
Note that the version of Node that gets installed should be the latest version available. You could have changed the brew command to specify a different version. You are still stuck with just a single version of Node, which may or may not be what you need all the time.
Fortunately, there is a better way, which I describe in detail later.