This warning occurs when prebuild-install can't find prebuilt binaries for your platform/Node.js combination. It falls back to compiling from source, which requires build tools.
The "No prebuilt binaries found" message is actually a warning, not an error. It means prebuild-install couldn't find a pre-compiled binary for your specific combination of: - Node.js version - Operating system (Linux, macOS, Windows) - CPU architecture (x64, arm64, arm) - C library (glibc, musl) When this happens, npm falls back to compiling the native module from source using node-gyp. The actual error occurs if this compilation fails—usually because build tools aren't installed. Many packages use prebuild-install to provide faster installations by distributing pre-compiled binaries, but they can't cover every possible platform/version combination.
The warning itself isn't the problem—the issue is if compilation fails. Install build tools:
Linux (Debian/Ubuntu):
sudo apt-get update
sudo apt-get install -y build-essential python3macOS:
xcode-select --installWindows:
npm install --global --production windows-build-toolsAlpine Linux (Docker):
RUN apk add --no-cache python3 make g++Packages often have prebuilt binaries for LTS versions. Try switching:
# Check current version
node --version
# Use nvm to switch to LTS
nvm install --lts
nvm use --lts
# Clean reinstall
rm -rf node_modules package-lock.json
npm installLTS versions (16, 18, 20) typically have better prebuilt binary coverage.
Some packages don't support all platforms. Check the package's GitHub releases or npm page for available binaries.
Common unsupported combinations:
- Alpine Linux (musl libc instead of glibc)
- ARM architecture (Raspberry Pi, AWS Graviton)
- Apple Silicon (M1/M2) on older package versions
- Very new Node.js versions
If compilation keeps failing, consider JavaScript alternatives:
| Native Package | JS Alternative |
|---------------|----------------|
| bcrypt | bcryptjs |
| sqlite3 | sql.js, better-sqlite3 |
| sharp | jimp |
| node-sass | sass (dart-sass) |
These don't require compilation and work everywhere.
Sometimes cached data causes issues:
npm cache clean --force
rm -rf node_modules package-lock.json
npm installThis is a warning, not an error: The "No prebuilt binaries found" message just means npm will compile from source. Installation only fails if compilation fails.
Docker considerations: Use multi-stage builds to compile in a full image and copy to slim:
FROM node:20 AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y build-essential python3
COPY package*.json ./
RUN npm ci
FROM node:20-slim
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modulesApple Silicon (M1/M2): Older packages may not have arm64 binaries. Try:
arch -x86_64 npm installThis runs npm under Rosetta 2.
CI/CD optimization: If builds are slow due to compilation, consider caching node_modules or using a base image with preinstalled build tools.
npm ERR! code ENOAUDIT npm ERR! Audit endpoint not supported
How to fix "npm ERR! code ENOAUDIT - Audit endpoint not supported"
npm ERR! code EBADDEVENGINES npm ERR! devEngines.runtime incompatible with current node version
How to fix "npm ERR! code EBADDEVENGINES - devEngines.runtime incompatible with current node version"
npm ERR! code ETOOMANYARGS npm ERR! Too many arguments
How to fix "npm ERR! code ETOOMANYARGS - Too many arguments"
npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name: tag names cannot contain spaces
How to fix "npm ERR! code EINVALIDTAGNAME - tag names cannot contain spaces"
npm ERR! code E400 npm ERR! 400 Bad Request
How to fix "npm ERR! code E400 - 400 Bad Request" error