Appendix A. Installing Node

This appendix provides more details on installing Node.js. If you’re fairly new to Node, we recommend installing it with a prebuilt package. We explain this for each major operating system.

Depending on your requirements, you can install Node in other ways instead. If you’re more experienced with Node or have specific DevOps requirements, skip ahead to review other ways you can install Node.

A.1. Installing Node by using an installer

Node has two installers and several prebuilt binary packages. If you use macOS or Windows, you can use either binaries or installers. The binary packages contain executable files, but the installers have installation wizards that help you put Node on your system in a place that’s easy to find when you’re running commands such as node or npm in the terminal.

If you’re new to Node, use an installer. All of the versions can be found on Node’s website under Downloads (https://nodejs.org/en/download/).

A.1.1. The macOS installer

For macOS, download the 64-bit .pkg file from Node’s website (https://nodejs.org/en/download/). You can use either the LTS or Current release. You should see a package file, as shown in figure A.1.

Figure A.1. The installer .pkg file

After you’ve downloaded the installer, double-click it to open the installation wizard (Figure A.2).

Figure A.2. The installation wizard

A.2. Using other ways to install Node

sitemap