This error occurs when node-gyp can't find the 'make' build tool. Make is required to orchestrate the compilation of native npm modules.
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.
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 installWhat 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-essentialnpm ERR! code E401 npm ERR! 401 Unauthorized - Token has expired
Token has expired - npm authentication failure
npm ERR! code EAI_NODATA npm ERR! errno EAI_NODATA npm ERR! getaddrinfo EAI_NODATA registry.npmjs.org
How to fix "npm ERR! code EAI_NODATA - getaddrinfo EAI_NODATA"
npm ERR! code EMPTYPACKAGE npm ERR! Package contains no files
How to fix 'npm ERR! code EMPTYPACKAGE' - Package contains no files
npm ERR! code EWORKSPACEMISSING npm ERR! Workspace does not exist: packages/missing
How to fix "npm ERR! code EWORKSPACEMISSING - Workspace does not exist" error
npm ERR! code EADDRNOTAVAIL npm ERR! errno EADDRNOTAVAIL npm ERR! Address not available
How to fix "npm ERR! code EADDRNOTAVAIL - Address not available" error