stablyai/orca · error · Error
Electron builds are not available on platform: ${targetPlatf
Error message
Electron builds are not available on platform: ${targetPlatform} What it means
getElectronPlatformPath maps the target platform to Electron's binary path inside the archive (e.g. 'Electron.app/Contents/MacOS/Electron' on darwin, 'electron' on linux, 'electron.exe' on win32). It throws for any platform outside the handled set. The target platform is resolved from ELECTRON_INSTALL_PLATFORM, then npm_config_platform, then osPlatform().
Source
Thrown at config/scripts/install-electron-package-binary.mjs:371
}
function getElectronTargetArch() {
return process.env.ELECTRON_INSTALL_ARCH || process.env.npm_config_arch || process.arch
}
function getElectronPlatformPath(targetPlatform) {
switch (targetPlatform) {
case 'mas':
case 'darwin':
return 'Electron.app/Contents/MacOS/Electron'
case 'freebsd':
case 'openbsd':
case 'linux':
return 'electron'
case 'win32':
return 'electron.exe'
default:
throw new Error(`Electron builds are not available on platform: ${targetPlatform}`)
}
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Set ELECTRON_INSTALL_PLATFORM (or npm_config_platform) to one of mas, darwin, freebsd, openbsd, linux, win32.
- Run the install on a supported host OS.
- Check for a typo in the platform env var.
Example fix
# before export ELECTRON_INSTALL_PLATFORM=linix # after export ELECTRON_INSTALL_PLATFORM=linux
Defensive patterns
Strategy: type-guard
Validate before calling
const SUPPORTED = new Set(['mas','darwin','freebsd','openbsd','linux','win32'])
const targetPlatform = process.env.ELECTRON_INSTALL_PLATFORM || process.env.npm_config_platform || osPlatform()
if (!SUPPORTED.has(targetPlatform)) {
throw new Error(`Unsupported Electron target platform: ${targetPlatform}`)
} Type guard
function isElectronSupportedPlatform(value: unknown): value is 'mas'|'darwin'|'freebsd'|'openbsd'|'linux'|'win32' {
return typeof value === 'string' && ['mas','darwin','freebsd','openbsd','linux','win32'].includes(value)
} Prevention
- Only set ELECTRON_INSTALL_PLATFORM/npm_config_platform to a supported value.
- Run the install on a supported host OS rather than forcing an exotic target.
When it happens
Trigger: ELECTRON_INSTALL_PLATFORM or npm_config_platform is set to an unsupported value (e.g. 'aix', 'sunos', 'android'); the host os.platform() returns something other than darwin/linux/win32/freebsd/openbsd/mas.
Common situations: Cross-installing Electron for an unsupported target; a typo in ELECTRON_INSTALL_PLATFORM (e.g. 'linix'); running on an exotic OS.
Related errors
- [electron-package] ${command.label} failed with status ${res
- Electron builds are not available on platform: ${targetPlatf
- [plain-node-entry-guard] "${entryName}" reaches chunk "${chu
- Electron did not expose GC; keep --js-flags=--expose-gc in t
- The production watchdog is macOS-only; run this benchmark on
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/ec030e89270c61fc.
Report an issue: GitHub.