How to fix npm ERR! prebuild-install WARN install No prebuilt binaries found in npm

npmINTERMEDIATEMEDIUMUpdated Dec 5, 2025· 208 views

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.

Quick fix

Fixes npm ERR! prebuild-install WARN install No prebuilt binaries found

sudo apt-get update
sudo apt-get install -y build-essential python3
  1. Install build tools for fallback compilation
  2. Try a supported Node.js version
  3. Check package's supported platforms
  4. Use a pure JavaScript alternative
npm — error
sudo apt-get update
sudo apt-get install -y build-essential python3
npm ERR! prebuild-install WARN install No prebuilt binaries found

What this error means

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.

Typical symptoms

  • Warning about 'No prebuilt binaries found' during npm install
  • Installation takes longer than expected (compiling from source)
  • Fails if build tools aren't installed
  • Works on some machines but not others

Common causes

  1. Node.js version not supported by package's prebuilt binaries
  2. Unsupported platform/architecture (ARM, Apple Silicon, Alpine Linux)
  3. Package hasn't published binaries for latest Node.js version
  4. Build tools not installed for fallback compilation
  5. Musl libc (Alpine) instead of glibc (most Linux distros)

How to fix "npm ERR! prebuild-install WARN install No prebuilt binaries found"

1Install build tools for fallback compilation

The warning itself isn't the problem—the issue is if compilation fails. Install build tools:

Linux (Debian/Ubuntu):

bash
sudo apt-get update
sudo apt-get install -y build-essential python3

macOS:

bash
xcode-select --install

Windows:

powershell
npm install --global --production windows-build-tools

Alpine Linux (Docker):

dockerfile
RUN apk add --no-cache python3 make g++
2Try a supported Node.js version

Packages often have prebuilt binaries for LTS versions. Try switching:

bash
# 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 install

LTS versions (16, 18, 20) typically have better prebuilt binary coverage.

3Check package's supported platforms

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

4Use a pure JavaScript alternative

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.

5Clear cache and retry

Sometimes cached data causes issues:

bash
npm cache clean --force
rm -rf node_modules package-lock.json
npm install

Advanced notes

This 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:

dockerfile
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_modules

Apple Silicon (M1/M2): Older packages may not have arm64 binaries. Try:

bash
arch -x86_64 npm install

This 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.

Frequently asked questions

What does "npm ERR! prebuild-install WARN install No prebuilt binaries found" mean?
The "No prebuilt binaries found" message is actually a warning, not an error. 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.
How do I fix "npm ERR! prebuild-install WARN install No prebuilt binaries found"?
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.
What causes "npm ERR! prebuild-install WARN install No prebuilt binaries found"?
Node.js version not supported by package's prebuilt binaries Unsupported platform/architecture (ARM, Apple Silicon, Alpine Linux) Package hasn't published binaries for latest Node.js version
Is the "npm ERR! prebuild-install WARN install No prebuilt binaries found" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading