/download lets users choose how to install Node.js across different operating systems, architectures, and package managers. The page is driven by configuration, icons, TypeScript type definitions, code snippets, and translation strings.
Overview
The downloads page supports three categories of options:- Installation Methods — Direct ways to install Node.js (official installers, version managers, etc.)
- Package Managers — Third-party package managers that can install Node.js
- Platform Compatibility — Per-method restrictions by OS, Node.js version, and CPU architecture
Adding an installation method
Update the configuration
Add your method to the
INSTALL_METHODS array in apps/site/util/downloadUtils.tsx:| Property | Description |
|---|---|
iconImage | React component for the method icon |
url | Link to official installation docs |
value | Unique identifier string |
recommended | true only for official/first-party methods |
compatibility | Optional restrictions (see below) |
Create an icon component
Add the SVG icon to Then export it from the index file:
@node-core/ui-components/Icons/InstallationMethod/:Write an installation snippet
Create a Bash snippet in Snippets are template literals with access to a
apps/site/snippets/en/download/:props object:| Variable | Example value |
|---|---|
props.version | 24.0.0 |
props.major | 24 |
props.versionWithPrefix | v24.0.0 |
Adding a package manager
Package managers follow the same five-step process, but usePACKAGE_MANAGERS in downloadUtils.tsx instead of INSTALL_METHODS, and icons go in @node-core/ui-components/Icons/PackageManager/.
Compatibility configuration
Thecompatibility object on each method controls when it appears in the UI. All fields are optional; omitting a field means no restriction applies.
Operating system restrictions
Operating system restrictions
| Value | Platform |
|---|---|
LINUX | Linux distributions |
MAC | macOS |
WIN | Windows |
Version restrictions
Version restrictions
Uses semver range syntax:
| Range | Meaning |
|---|---|
>=14.0.0 | Version 14.0.0 and higher |
<21.0.0 | Below version 21.0.0 |
^18.0.0 | Compatible with 18.x.x |
~20.1.0 | Compatible with 20.1.x |
Architecture restrictions
Architecture restrictions
| Value | Architecture |
|---|---|
x64 | 64-bit x86 |
arm64 | 64-bit ARM |
x86 | 32-bit x86 |
Combined restrictions
Combined restrictions
Fields are ANDed together. A method with all three restrictions only appears when all conditions match:This method appears only for Linux or macOS users on Node.js 16.0.0 or higher running x64 or ARM64 hardware.
Snippet template syntax
Snippets use JavaScript template literal expressions with access toprops: