NousResearch/hermes-agent · error · Error
[stage-native-deps] no prebuilt binary for ${platform}-${arc
Error message
[stage-native-deps] no prebuilt binary for ${platform}-${arch} and cannot cross-compile native modules from ${process.platform}-${process.arch}. Build on the target platform or provide a prebuild. What it means
Error "[stage-native-deps] no prebuilt binary for ${platform}-${arch} and cannot cross-compile native modules from ${process.platform}-${process.arch}. Build on the target platform or provide a prebuild." thrown in NousResearch/hermes-agent.
Source
Thrown at apps/desktop/scripts/stage-native-deps.mjs:303
// app that crashes the first time a terminal is spawned.
if (hostMatch) {
const buildReleaseDir = join(srcRoot, 'build/Release')
copyBuildRelease(buildReleaseDir, join(destRoot, 'build/Release'))
}
// Check whether a native binary for this target was staged.
const stagedDirs = [
join(destRoot, 'prebuilds', `${platform}-${arch}`),
join(destRoot, 'build/Release')
]
const hasNativeBinary = stagedDirs.some((dir) => {
if (!existsSync(dir)) return false
return readdirSync(dir, { recursive: true }).some((name) => String(name).endsWith('.node'))
})
if (!hasNativeBinary) {
if (platform !== process.platform) {
throw new Error(
`[stage-native-deps] no prebuilt binary for ${platform}-${arch} and ` +
`cannot cross-compile native modules from ${process.platform}-${process.arch}. ` +
`Build on the target platform or provide a prebuild.`
)
}
// Same platform, possibly different arch — rebuild from source with
// the target architecture so electron-rebuild produces the correct
// binary rather than defaulting to the host's arch.
console.log(
`[stage-native-deps] no native binary for ${platform}-${arch}; ` +
`running electron-rebuild (target arch: ${arch})...`
)
const rebuildArgs = [
'../../node_modules/.bin/electron-rebuild',
'-f',
'-w',
'node-pty',
'--arch',View on GitHub (pinned to c896c09c42)
Solutions
- Run the staging step on the target platform, or provide a prebuilt binary for that platform-arch.
- Cross-build the native module with an appropriate toolchain before staging.
When it happens
Trigger: Thrown at apps/desktop/scripts/stage-native-deps.mjs:303 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/13031292663d6d11.
Report an issue: GitHub.