NousResearch/hermes-agent · error · Error
electron-rebuild failed for ${platform}-${arch} (exit ${resu
Error message
electron-rebuild failed for ${platform}-${arch} (exit ${result.status}). Cannot stage node-pty without a native binary. What it means
Error "electron-rebuild failed for ${platform}-${arch} (exit ${result.status}). Cannot stage node-pty without a native binary." thrown in NousResearch/hermes-agent.
Source
Thrown at apps/desktop/scripts/stage-native-deps.mjs:329
// 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',
arch
]
const result = spawnSync(process.execPath, rebuildArgs, {
cwd: projectRoot,
stdio: 'inherit'
})
if (result.status !== 0) {
throw new Error(
`electron-rebuild failed for ${platform}-${arch} (exit ${result.status}). ` +
`Cannot stage node-pty without a native binary.`
)
}
// Re-copy build/Release after electron-rebuild populated it.
const buildReleaseDir = join(srcRoot, 'build/Release')
copyBuildRelease(buildReleaseDir, join(destRoot, 'build/Release'))
}
// Validate every staged .node binary matches the target platform.
validateStagedBinaries(destRoot, platform)
console.log(`[stage-native-deps] staged node-pty (${platform}-${arch}) -> ${destRoot}`)
return destRoot
}
export function stageNodePty({ platform = process.platform, arch = process.arch } = {}) {
const srcRoot = resolveNodePtyRoot()View on GitHub (pinned to c896c09c42)
Solutions
- Inspect the electron-rebuild output, fix the native build error, and rerun.
- Ensure the build toolchain for the target platform is installed (headers, compilers).
- Use a prebuilt node-pty binary for the target platform instead of rebuilding.
When it happens
Trigger: Thrown at apps/desktop/scripts/stage-native-deps.mjs:329 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/84aee9b8f433d141.
Report an issue: GitHub.