How to fix npm ERR! gyp ERR! stack Error: not found: make in npm
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- Install make on Linux (Debian/Ubuntu)
- Install make on Linux (RHEL/CentOS/Fedora)
- Install make on macOS
- Install make on Windows
# Recommended: includes make, gcc, g++sudo apt-get updatesudo apt-get install -y build-essential# Or just makesudo apt-get install -y make# Verifymake --versionnpm 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
- Make utility not installed
- Installed compilers but not make
- Minimal system/container without build tools
- Make not in PATH
How to fix "npm ERR! gyp ERR! stack Error: not found: make"
Install make with build-essential (recommended) or standalone:
# 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# RHEL/CentOS
sudo yum install make
# Fedora
sudo dnf install make
# Or full development tools
sudo yum groupinstall "Development Tools"Xcode Command Line Tools includes make:
xcode-select --installOr install via Homebrew:
brew install makeWindows uses MSBuild instead of make, which comes with Visual Studio:
# Option 1: windows-build-tools (includes what's needed)
npm install --global --production windows-build-tools
# Option 2: Visual Studio with C++ workloadIf you specifically need GNU make on Windows:
choco install makeAdd to your Dockerfile:
Debian/Ubuntu:
RUN apt-get update && apt-get install -y \
build-essential python3 \
&& rm -rf /var/lib/apt/lists/*Alpine:
RUN apk add --no-cache make python3 g++npm cache clean --force
npm installAdvanced 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:
# GitHub Actions example
- name: Install build tools
run: sudo apt-get update && sudo apt-get install -y build-essentialFrequently 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
- ๐npm Official Documentation
- ๐npm: node-gyp package(Official Docs)
- ๐GitHub: node-gyp troubleshooting(GitHub)
- ๐