nodenv /node-build

A tool to download, compile, and install Node on Unix-like systems.

★ 300⑂ 89👁 5⑃ 1,023● 123▤ 351◈ 0
ShellMITCreated 2013-03-10
300
stars
89
forks
5
watchers
1,023
prs
123
issues
351
releases
0
discussions

README

node-build

Download, compile, and install Node on Unix-like systems.






node-build is a command-line tool that simplifies installation of any Node version from source or precompiled binary on Unix-like systems.

It is available as a plugin for [nodenv][] as the nodenv install command, or as a standalone program as the node-build command.



- Installation
   Upgrading
    + Updating available build versions
- Usage
   Basic Usage
   Advanced Usage
    + Binaries
    + Custom Build Definitions
    + Custom Build Configuration
    + Applying Patches
    + Checksum Verification
    + Package Mirrors
    + Keeping the build directory after installation
    + Retry installation without v/node-/node-v prefix
- Getting Help
- Credits



 Installation

 Homebrew package manager
sh
brew install node-build


Upgrade with:
sh
brew upgrade node-build


 Clone as nodenv plugin using git
sh
git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build


Upgrade with:
sh
git -C "$(nodenv root)"/plugins/node-build pull


 Install manually as a standalone program

First, download a tarball from https://github.com/nodenv/node-build/releases/latest. Then:
sh
tar -xzf node-build-.tar.gz
PREFIX=/usr/local ./node-build-/install.sh


 Usage

 Basic Usage

sh
 As a nodenv plugin
$ nodenv install --list                     lists all available versions of Node
$ nodenv install 10.13.0                    installs Node 10.13.0 to ~/.nodenv/versions

 As a standalone program
$ node-build --definitions                  lists all available versions of Node
$ node-build 10.13.0 ~/local/node-10.13.0   installs Node 10.13.0 to ~/local/node-10.13.0


 Warning
 node-build mostly does not verify that system dependencies are present before downloading and attempting to compile Node from source. Please ensure that [all requisite libraries][build-env] such as build tools and development headers are already present on your system.

Firstly, if a precompiled binary exists for your platform, node-build downloads and installs it.
Otherwise it will build node from source.
Basically, what node-build does when installing a Node version is this:
- Downloads an official tarball of Node source code;
- Extracts the archive into a temporary directory on your system;
- Executes ./configure --prefix=/path/to/destination in the source code;
- Runs make install to compile Node;
- Verifies that the installed Node is functional.

 Advanced Usage

 Binaries

By default, node-build will attempt to match one of the precompiled binaries
to your platform. If there is a binary for your platform, it will install it
instead of compiling from source. To force compilation, pass the -c or
--compile flag.

 Custom Build Definitions

To install a version of Node that is not recognized by node-build, you can specify the path to a custom build definition file in place of a Node version number.

Check out [default build definitions][definitions] as examples on how to write definition files.

Top issues

Latest release

v5.4.62 v5.4.62 2026-10-29
What's Changed
 Bump step-security/harden-runner from 2.21.1 to 2.22.1 by @dependabot[bot] in https://github.com/nodenv/node-build/pull/1144
 Scraped latest definitions by @nodenv-bot in https://github.com/nodenv/node-build/pull/1145


Full Changelog: https://github.com/nodenv/node-build/compare/v5.4.61...v5.4.62

Snapshot: 2026-11-11T15:31:17Z · Data license Apache-2.0 · JSON