On this page

Node.js is the runtime that executes JavaScript on your machine. It bundles the V8 JavaScript engine together with a set of built-in modules that let you run JavaScript outside of a browser.

Download the appropriate installer for your platform from the Node.js downloads page. The LTS (Long Term Support) release is the most stable choice and is recommended for addon development. The installer includes npm.

Node-API is stable in all currently supported Node.js releases. Any Active LTS or Maintenance LTS release will work.

npm is the package manager for Node.js. It is installed alongside Node.js. For most Node-API developers, the goal is to publish an npm package that wraps a C/C++ library and makes it available to JavaScript users.

npm is included with Node.js. You can keep it up to date with:

Git is not strictly required for Node-API work, but it is used throughout the ecosystem. Most example repositories and dependency installations rely on it.

In addition to Node and npm, you need a C/C++ compiler toolchain and Python (required by node-gyp.

The recommended approach is to install Visual Studio Build Tools with the "Desktop development with C++" workload selected. This provides the MSVC compiler, Windows SDK, and the build infrastructure node-gyp requires.

Alternatively, you can install via winget:

During or after installation, open Visual Studio Installer and ensure the "Desktop development with C++" workload is checked.

Python 3 is also required. Install it from python.org or via winget:

Run PowerShell or cmd.exe as Administrator when installing global tools.

Install Apple's command-line developer tools. If you haven't installed Xcode already, the quickest route is:

If that fails, install the full Xcode IDE from the Mac App Store, which includes the necessary compiler toolchain.

Python 3 is not bundled with modern macOS. Install it using Homebrew:

Or download an installer from python.org.

On most Linux distributions the required C/C++ toolchain and Python are either pre-installed or easily added. For Debian/Ubuntu-based systems:

sudo apt-get update
sudo apt-get install -y build-essential python3

For other distributions, refer to your package manager's documentation or the LLVM installation guide.

After installation, verify each tool is on your PATH.

node --version
npm --version
python3 --version
git --version
cc --version
make --version
node --version
npm --version
python --version
git --version

To confirm the MSVC compiler is available, open a Developer Command Prompt (installed with Visual Studio Build Tools) and run:

You'll need a shell - Terminal on macOS/Linux, PowerShell or Windows Terminal on Windows.

A capable code editor is strongly recommended. Visual Studio Code has excellent C/C++ support via the C/C++ extension and integrates well with node-gyp builds. CLion is another popular choice for C++ development.