stablyai/orca · error · Error
config/scripts/install-electron-package-binary.mjs exited wi
Error message
config/scripts/install-electron-package-binary.mjs exited with status ${result.status} What it means
Thrown by runElectronPackageBinaryInstall in config/scripts/rebuild-native-deps.mjs when the child script config/scripts/install-electron-package-binary.mjs exits with a non-zero status (and spawnSync itself did not error — that path rethrows result.error instead). The child script downloads and extracts the Electron binary; a non-zero exit means the download/extract failed and Electron's dist tree is not usable.
Source
Thrown at config/scripts/rebuild-native-deps.mjs:268
const env = { ...process.env }
delete env.ELECTRON_SKIP_BINARY_DOWNLOAD
delete env.npm_config_electron_skip_binary_download
const result = spawnSync(
process.execPath,
['config/scripts/install-electron-package-binary.mjs'],
{
cwd: projectDir,
env,
stdio: 'inherit'
}
)
if (result.error) {
throw result.error
}
if (result.status !== 0) {
throw new Error(
`config/scripts/install-electron-package-binary.mjs exited with status ${result.status}`
)
}
}
function resetPartialElectronInstall() {
// Why: Electron's installer can leave a partial dist/ tree behind after
// skipped or interrupted postinstall runs; retry from a clean target.
rmSync(resolve(electronPackageDir, 'dist'), { recursive: true, force: true })
rmSync(resolve(electronPackageDir, 'path.txt'), { force: true })
}
function continuePostinstallWithoutElectron() {
if (!isPostinstall() || process.env.ORCA_STRICT_ELECTRON_INSTALL === '1') {
return false
}
console.error(
'[rebuild] Continuing postinstall because Electron binary installation failed. ' +View on GitHub (pinned to 1136503c6a)
Solutions
- Retry the rebuild — Electron download failures are usually transient.
- Set ELECTRON_MIRROR or ELECTRON_CUSTOM_DIR to a reachable mirror if GitHub's CDN is blocked.
- Clear the Electron cache (rm node_modules/electron/dist + path.txt) and reinstall to rule out a corrupted partial extract.
Example fix
// before node config/scripts/rebuild-native-deps.mjs # install-electron-package-binary.mjs exited with status 1 // after # retry; if persistent, point at a mirror ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ node config/scripts/rebuild-native-deps.mjs
Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight: confirm Electron can be reached. The download itself is not
// guaranteed, but a reachable mirror reduces transient failures.
if (process.env.ELECTRON_MIRROR) {
const ok = await fetch(process.env.ELECTRON_MIRROR).then((r) => r.ok).catch(() => false)
if (!ok) throw new Error(`ELECTRON_MIRROR unreachable: ${process.env.ELECTRON_MIRROR}`)
} Try / catch
for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
runElectronPackageBinaryInstall()
break
} catch (err) {
if (attempt === maxRetries - 1) throw err
await backoff(attempt)
}
} Prevention
- Retry Electron downloads — failures are usually transient network blips.
- Set ELECTRON_MIRROR to a reachable mirror when GitHub's CDN is blocked.
- Clear node_modules/electron/dist + path.txt before retrying to avoid partial extracts.
When it happens
Trigger: The Electron binary download fails due to network error, a mirror returning 403/404, a checksum mismatch, or the install script hitting an out-of-disk condition. spawnSync returns status != 0, no result.error, and line 267-270 throws this message embedding the exit status.
Common situations: Flaky CI networks during Electron downloads, an unreachable ELECTRON_MIRROR, npm's electron binary cache corruption, or a transient GitHub/CDN outage. Electron downloads are notoriously intermittent, so this surfaces most often in CI.
Related errors
- node-pty resolved to ${native.dir}; expected build/Release s
- node-pty ConPTY runtime file is missing: ${runtimeFile}
- node-pty has no ConPTY runtime payload for win10-${rebuildAr
- node-pty is missing ${sourceFile}
- Electron builds are not available on platform: ${targetPlatf
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/6d913717186ee109.
Report an issue: GitHub.