Node.js "prebuild-install" Falls Back to Building From Source in CI
A native module ships prebuilt binaries via prebuild-install. When none matches the runner platform or Node ABI, it falls back to compiling from source with node-gyp, which needs a full toolchain and frequently fails in CI.
What this error means
An install logs that no prebuilt binary was found and starts a node-gyp compile, then fails on a missing compiler, Python, or headers.
prebuild-install warn install No prebuilt binaries found
(target=20.0.0 runtime=node arch=arm64 platform=linux)
gyp ERR! find Python
gyp ERR! stack Error: Could not find any Python installation to useCommon causes
No prebuilt binary for the platform/ABI
The module has no prebuilt artifact for the runner OS/arch or the Node ABI in use, so it must build from source.
The build toolchain is missing
The source fallback needs a C/C++ compiler, Python, and headers. A minimal runner lacks them, so the compile fails.
How to fix it
Match a Node version with a prebuilt binary
Pin a Node version/arch the module publishes prebuilds for so the fallback is never triggered.
- Check the module releases for supported Node ABIs/arches.
- Pin the CI Node version to a supported one.
- Re-run install and confirm the prebuilt binary is used.
Provide the build toolchain for the fallback
If a source build is unavoidable, install the compiler and Python on the runner.
# Debian/Ubuntu runner
sudo apt-get update && sudo apt-get install -y build-essential python3How to prevent it
- Pin Node versions/arches that have published prebuilt binaries.
- Cache native module builds to avoid repeated source compiles.
- Keep a build toolchain available where source fallback is possible.