
Installing Node.js
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine, and is designed to build scalable network applications. Node allows JavaScript to be executed in a Terminal, and is an indispensable tool for any web developer. For more information on what Node.js is, you can read the project's About Node.js page at https://nodejs.org/en/about/.
According to the Expo installation documentation, Node.js is not technically required, but as soon as you start actually building something, you'll want to have it. Node.js itself is outside the scope of this book, but you can check out the Further reading section at the end of this chapter for more resources on working with Node.js.
There are numerous methods to install Node.js, and it is therefore difficult to recommend a particular installation method. On macOS, you can install Node.js in one of the following ways:
- Downloading and installing Node.js from the project's site at https://nodejs.org/en/download/.
- Installing via Homebrew. If you are familiar with Homebrew, this process is explained succinctly at https://medium.com/@katopz/how-to-install-specific-nodejs-version-c6e1cec8aa11.
- Installing via Node Version Manager (NVM; https://github.com/creationix/nvm). NVM allows you to install multiple versions of Node.js and easily switch between them. Use the instructions provided in the repository's README to install NVM. This is the recommended method, due to its flexibility, as long as you're comfortable working in the Terminal.