Skip to content
Latchkey

node-gyp "not found: make" in CI

node-gyp drives a native compile that needs make and a C/C++ compiler. The build failed because the runner has no build toolchain installed.

What this error means

Installing a native addon fails with "gyp ERR! stack Error: not found: make". The runner lacks build-essential / a compiler that your local machine already has.

node
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (.../which.js:13:12)

Common causes

No build toolchain on the runner

A slim image omits make, gcc, and g++ that node-gyp invokes to compile the addon.

Compiler present but make absent

Some images have a compiler but not GNU make, which node-gyp specifically calls.

How to fix it

Install the build toolchain

Add make and a C/C++ compiler before the install step.

Terminal
# Debian/Ubuntu
apt-get update && apt-get install -y build-essential python3
npm ci

Use prebuilt binaries instead

Prefer packages that ship prebuilds so no compile (and no toolchain) is needed.

  1. Check whether the package offers prebuilt binaries for your platform.
  2. Ensure prebuild download is not blocked by network policy.
  3. Fall back to building only when a prebuild is unavailable.

How to prevent it

  • Install build-essential on runners that compile native addons.
  • Prefer packages with prebuilt binaries.
  • Keep Python and the compiler available together for node-gyp.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →