Skip to content

Updating Available Definitions

Jason Karns edited this page Jul 16, 2020 · 8 revisions

How node-build works

node-build inherits its architecture from ruby-build, which has a more complicated process for compiling ruby. As such, node-build relies on the use of definition files to instruct node-build how to build/compile/install a version of node. While this does have its drawbacks, it also enables node-build (and nodenv) to more easily add support for alternative node runtimes (like iojs, lowjs, quickjs, graalvm, chakracore, etc). Thus, in order to install a particular version of node, a definition file for that particular version must exist somewhere for node-build to find.

Where node-build finds definitions

node-build itself looks in two locations:

  1. all the colon-separated paths listed in NODE_BUILD_DEFINITIONS

  2. node-build's own installation under share/node-build/

    (When installed via Homebrew, this is $(brew --prefix node-build)/share/node-build/.)

The nodenv-install plugin for nodenv adds additional locations:

  1. all paths found in $(nodenv root)/plugins/*/share/node-build

Clone this wiki locally