{"record":{"id":"ec030e89270c61fc","repo":"stablyai/orca","slug":"electron-builds-are-not-available-on-platform-t","errorCode":null,"errorMessage":"Electron builds are not available on platform: ${targetPlatform}","messagePattern":"Electron builds are not available on platform: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/install-electron-package-binary.mjs","lineNumber":371,"sourceCode":"}\n\nfunction getElectronTargetArch() {\n  return process.env.ELECTRON_INSTALL_ARCH || process.env.npm_config_arch || process.arch\n}\n\nfunction getElectronPlatformPath(targetPlatform) {\n  switch (targetPlatform) {\n    case 'mas':\n    case 'darwin':\n      return 'Electron.app/Contents/MacOS/Electron'\n    case 'freebsd':\n    case 'openbsd':\n    case 'linux':\n      return 'electron'\n    case 'win32':\n      return 'electron.exe'\n    default:\n      throw new Error(`Electron builds are not available on platform: ${targetPlatform}`)\n  }\n}\n","sourceCodeStart":353,"sourceCodeEnd":374,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/install-electron-package-binary.mjs#L353-L374","documentation":"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().","triggerScenarios":"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.","commonSituations":"Cross-installing Electron for an unsupported target; a typo in ELECTRON_INSTALL_PLATFORM (e.g. 'linix'); running on an exotic OS.","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."],"exampleFix":"# before\nexport ELECTRON_INSTALL_PLATFORM=linix\n\n# after\nexport ELECTRON_INSTALL_PLATFORM=linux","handlingStrategy":"type-guard","validationCode":"const SUPPORTED = new Set(['mas','darwin','freebsd','openbsd','linux','win32'])\nconst targetPlatform = process.env.ELECTRON_INSTALL_PLATFORM || process.env.npm_config_platform || osPlatform()\nif (!SUPPORTED.has(targetPlatform)) {\n  throw new Error(`Unsupported Electron target platform: ${targetPlatform}`)\n}","typeGuard":"function isElectronSupportedPlatform(value: unknown): value is 'mas'|'darwin'|'freebsd'|'openbsd'|'linux'|'win32' {\n  return typeof value === 'string' && ['mas','darwin','freebsd','openbsd','linux','win32'].includes(value)\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["electron","platform","install"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}