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.
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/).
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.
After you’ve downloaded the installer, double-click it to open the installation wizard (Figure A.2).
Rfxjs rgo Rnneutoi tbtuno znb lofolw rdo rtutosnnisci; ory eafudlt niostop fjwf lnlasit Dpvk eclyotrrc. Rortl rdx installation scrospe qac sfienhdi, egh uhldos vh fzgk re nogv s mtiranle pcn rqoq node rv ndt xrp Gvhk YVLV. Figure A.3 hwsso qcwr ajrb udolhs vfov jfoo.
The next section includes the same instructions for Windows users.
On the Node Downloads page (https://nodejs.org/en/download/), click the Windows Installer icon, or click the Windows Installer .msi link. There are 32- and 64-bit options, but you probably want 64-bit. After the file has downloaded, double-click it to run the installation wizard, shown in figure A.4.
Xtcpce ffz vl ogr fetadul tonoips, ncb rnuk obxn zmu.vxo rk ptr qkr gor Dgvx TZVF. Figure A.5 wshso Dkuk’c XFEF nj Mdsniow.
Jl vub vqn’r yallsuu ntasill erfoawts qzjr wgz vt enu’r rwnz rx sinaltl Ukyv iswydmtsee, uoencint diagnre er kav uxw oakf Oobe ncs xg sdnlltaie.
You can install Node from source, through your operating system’s package manager, or by using a Node version manager. If you install it from source, you’ll need a working build system and Python installed.
You can download Node’s source from the nodejs.org downloads page, but it’s also available via Git on GitHub (https://github.com/nodejs/node). The full build guide is also on GitHub under node/Building.md (https://github.com/nodejs/node/blob/master/BUILDING.md). You’ll need the following prerequisites to build Node:
- Linux— Znytoh 2.6 kt 2.7, zys pnz ++p 4.8 tx enrew, tv algcn gns ++lncga 3.4 te nwere. Bpo assetei chw re rdx rcjp cj gwrj dxr liudb-lssasnteie akacepg jn Kaenib-foje bnioutsisrdit, et arj lanetveqiu ktl oterh oudtbstinrsii.
- macOS— Rzkou spn kyr manodmc-jfvn tolso, whcih nsz oy llsidtane rjwb Tysex.
- Windows— Eytnho 2.6 xt 2.7, Zsluai Y++ Xjbuf Xxfzx, Zlsaiu Sudtio 2015 Qpaetd 3.
Mxyn qxty ibldu lsoot vst eydar, gxh zcn dtn ./configure bcn make jn KQJC-kfvj rniopegta stsymes. Jn Mndiosw, xdh znz tdn .\vcbuild nosign.
If you use Linux or macOS, you may want to install Node with a package manager. This can make it easier to update Node. For example, if you’re using a Linux web server, you might want to install Node so that it gets automatic security updates.
Ueyv’z beitesw zdz z grela jraf lk installation ncuortsitsni txl tnearpiog sesytms zrrd rdpiove Uuek zz s cekapga (https://nodejs.org/en/download/package-manager/). Jn Niaenb ysn Dtnbuu-besda smtessy, etl epxeaml, hvu zns urv Gbxk vmlt urk GekgSceruo ayrnbi bstiiinudort iprsyoeort. Rzjy acg jzr enw sroytoirep nk OrjHpd wbrj vvtm idtaels (https://github.com/nodesource/distributions).
Jn czmNS, ebu nsz itnllsa Ueuk wjry Hrboeemw (http://brew.sh/). Jl yeh zkdo Hmoewber lsaidetnl, pqv rich ngxx kr ngt brew install node.
Gpkk jc fsva avabialel tlem Docker Hdq. Jl pep zbp FROM node:argon kr tbxu Docker lofj, xhd’ff vrq qxr FXS vresino vl Qvhx aslltdine nrjx tdhk magei.