How to fix npm ERR! gyp ERR! stack Error: not found: make in npm

npmBEGINNERHIGHUpdated Dec 7, 2025ยท 108 views

This error occurs when node-gyp can't find the 'make' build tool. Make is required to orchestrate the compilation of native npm modules.

Quick fix

Fixes npm ERR! gyp ERR! stack Error: not found: make

# Recommended: includes make, gcc, g++
sudo apt-get update
sudo apt-get install -y build-essential

# Or just make
sudo apt-get install -y make

# Verify
make --version
  1. Install make on Linux (Debian/Ubuntu)
  2. Install make on Linux (RHEL/CentOS/Fedora)
  3. Install make on macOS
  4. Install make on Windows
npm โ€” error
# Recommended: includes make, gcc, g++
sudo apt-get update
sudo apt-get install -y build-essential
# Or just make
sudo apt-get install -y make
# Verify
make --version
npm ERR! gyp ERR! stack Error: not found: make

What this error means

The "not found: make" error means node-gyp can't find the `make` utility, which is essential for building native modules. Make reads instructions from Makefiles and orchestrates the compilation process. node-gyp generates build files and then uses `make` (on Unix) or MSBuild (on Windows) to actually compile the native code. Without make, the build process can't proceed. This typically happens on minimal systems, fresh installations, or Docker containers without build tools.

Typical symptoms

  • npm install fails with 'gyp ERR! not found: make'
  • Error occurs with native module packages
  • Have gcc/g++ but make is missing
  • Happens in Docker containers or CI environments

Common causes

  1. Make utility not installed
  2. Installed compilers but not make
  3. Minimal system/container without build tools
  4. Make not in PATH

How to fix "npm ERR! gyp ERR! stack Error: not found: make"

1Install make on Linux (Debian/Ubuntu)

Install make with build-essential (recommended) or standalone:

bash
# Recommended: includes make, gcc, g++
sudo apt-get update
sudo apt-get install -y build-essential

# Or just make
sudo apt-get install -y make

# Verify
make --version
2Install make on Linux (RHEL/CentOS/Fedora)
bash
# RHEL/CentOS
sudo yum install make

# Fedora
sudo dnf install make

# Or full development tools
sudo yum groupinstall "Development Tools"
3Install make on macOS

Xcode Command Line Tools includes make:

bash
xcode-select --install

Or install via Homebrew:

bash
brew install make
4Install make on Windows

Windows uses MSBuild instead of make, which comes with Visual Studio:

powershell
# Option 1: windows-build-tools (includes what's needed)
npm install --global --production windows-build-tools

# Option 2: Visual Studio with C++ workload

If you specifically need GNU make on Windows:

bash
choco install make
5Install make in Docker

Add to your Dockerfile:

Debian/Ubuntu:

dockerfile
RUN apt-get update && apt-get install -y \
    build-essential python3 \
    && rm -rf /var/lib/apt/lists/*

Alpine:

dockerfile
RUN apk add --no-cache make python3 g++
6Retry npm install
bash
npm cache clean --force
npm install

Advanced notes

What make does: Make reads a Makefile that describes how to compile source files into binaries. node-gyp generates these Makefiles based on binding.gyp in native modules.

Windows difference: Windows doesn't use make. Instead, node-gyp generates Visual Studio project files and uses MSBuild. The windows-build-tools package or Visual Studio installation provides everything needed.

CI/CD: Most CI services have make pre-installed on Linux runners. For Docker-based CI, ensure your image includes build tools:

yaml
# GitHub Actions example
- name: Install build tools
  run: sudo apt-get update && sudo apt-get install -y build-essential

Frequently asked questions

What does "npm ERR! gyp ERR! stack Error: not found: make" mean?
The "not found: make" error means node-gyp can't find the make utility, which is essential for building native modules. Make reads instructions from Makefiles and orchestrates the compilation process. node-gyp generates build files and then uses make (on Unix) or MSBuild (on Windows) to actually compile the native code.
How do I fix "npm ERR! gyp ERR! stack Error: not found: make"?
This error occurs when node-gyp can't find the 'make' build tool. Make is required to orchestrate the compilation of native npm modules.
What causes "npm ERR! gyp ERR! stack Error: not found: make"?
Make utility not installed Installed compilers but not make Minimal system/container without build tools
Is the "npm ERR! gyp ERR! stack Error: not found: make" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading