heygen-com/hyperframes · error · Error
[build-zip] ffprobe-static binary not found under ${ffprobeM
Error message
[build-zip] ffprobe-static binary not found under ${ffprobeModule}/bin/linux/. Did postinstall run? What it means
The build looks for ffprobe under ffprobe-static/bin/linux/x64/ffprobe or ffprobe-static/bin/linux/arm64/ffprobe. If neither path exists, it throws. The producer's audio pad/trim path spawns ffprobe at runtime, so its absence would cause runtime failures after deploy.
Source
Thrown at packages/aws-lambda/scripts/build-zip.ts:429
`[build-zip] ffmpeg-static binary missing at ${ffmpegBinary}. Did postinstall run?`,
);
}
assertLinuxX86_64Elf(ffmpegBinary, "ffmpeg-static binary");
const ffmpegDest = join(binDir, "ffmpeg");
cpSync(ffmpegBinary, ffmpegDest);
chmodSync(ffmpegDest, 0o755);
// ffprobe lives at `ffprobe-static/bin/<platform>/<arch>/ffprobe`.
// The producer's `audioPadTrim` spawns `ffprobe` from PATH so we need
// it alongside ffmpeg under /var/task/bin/.
const ffprobeModule = resolveModuleDir("ffprobe-static");
const ffprobeCandidates = [
join(ffprobeModule, "bin", "linux", "x64", "ffprobe"),
join(ffprobeModule, "bin", "linux", "arm64", "ffprobe"),
];
const ffprobeBinary = ffprobeCandidates.find((p) => existsSync(p));
if (!ffprobeBinary) {
throw new Error(
`[build-zip] ffprobe-static binary not found under ${ffprobeModule}/bin/linux/. Did postinstall run?`,
);
}
const ffprobeDest = join(binDir, "ffprobe");
cpSync(ffprobeBinary, ffprobeDest);
chmodSync(ffprobeDest, 0o755);
console.log(`[build-zip] staged ffmpeg + ffprobe → bin/`);
}
function stageChromeHeadlessShell(stagingDir: string): void {
// The fallback path bundles the same chrome-headless-shell binary the
// K8s deploy uses. The binary is fetched via `@puppeteer/browsers` on
// first build into the host's `~/.cache/puppeteer/`; the build script
// re-uses that cache rather than redownloading.
const home = process.env.HOME ?? "/root";
const baseDir = join(home, ".cache", "puppeteer", "chrome-headless-shell");
if (!existsSync(baseDir)) {View on GitHub (pinned to c2996c8626)
Solutions
- Install with npm_config_platform=linux and npm_config_arch=x64 so ffprobe-static fetches the linux binary.
- Build in a linux/amd64 container.
- Reinstall: rm -rf node_modules/ffprobe-static && npm_config_platform=linux npm_config_arch=x64 bun install.
Example fix
// before (on macOS) bun install // after npm_config_platform=linux npm_config_arch=x64 bun install
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from "node:fs";
import { join } from "node:path";
const ffprobeModule = resolveModuleDir("ffprobe-static");
const candidates = [
join(ffprobeModule, "bin", "linux", "x64", "ffprobe"),
join(ffprobeModule, "bin", "linux", "arm64", "ffprobe"),
];
if (!candidates.some(existsSync)) {
console.error("ffprobe-static linux binary missing. Install with npm_config_platform=linux npm_config_arch=x64.");
process.exit(1);
} Prevention
- Always set npm_config_platform=linux and npm_config_arch=x64 when installing on non-Linux hosts.
- Build in a linux/amd64 container to get the correct platform binaries.
- Verify ffprobe-static/bin/linux/ exists after install.
When it happens
Trigger: ffprobe-static is installed but its bin/linux/ directory is missing the ffprobe binary — either postinstall did not fetch it, or it fetched for a different platform (e.g., bin/darwin/ instead of bin/linux/).
Common situations: Building on macOS where ffprobe-static fetched bin/darwin/arm64/ffprobe instead of the linux variant; postinstall skipped via --ignore-scripts.
Related errors
- [build-zip] ${label} at ${path} is not a Linux x86-64 ELF ex
- [build-zip] ffmpeg-static binary missing at ${ffmpegBinary}.
- [build-zip] no linux64 chrome-headless-shell binary found un
- --source must be 'sparticuz' or 'chrome-headless-shell' (got
- Unknown flag: ${arg}
AI-assisted analysis of heygen-com/hyperframes@c2996c8626 (2026-08-12).
Data as JSON: /api/errors/567232f1bb67d905.
Report an issue: GitHub.