stablyai/orca · error · Error
Unsupported macOS build architecture: ${architecture}
Error message
Unsupported macOS build architecture: ${architecture} What it means
createMacBuildCompatibility writes a per-build compatibility descriptor for macOS and only accepts arm64 or x64 architectures. The architecture flows into the buildId and the descriptor's architecture field consumed by compatibility checks; an unknown value would produce a descriptor no consumer recognizes. This is a build-time guard in a CommonJS module.
Source
Thrown at config/scripts/mac-build-compatibility.cjs:9
const { writeFileSync } = require('node:fs')
const { join } = require('node:path')
const compatibilityContract = require('../../src/shared/local-build-compatibility-contract.json')
const MAC_BUILD_COMPATIBILITY_FILENAME = 'orca-local-build.json'
function createMacBuildCompatibility({ version, commit, architecture }) {
if (architecture !== 'arm64' && architecture !== 'x64') {
throw new Error(`Unsupported macOS build architecture: ${architecture}`)
}
return {
...compatibilityContract,
buildId: `${version}-${commit}-${architecture}`,
version,
commit,
platform: 'darwin',
architecture
}
}
function writeMacBuildCompatibility(resourcesDir, identity) {
const compatibility = createMacBuildCompatibility(identity)
writeFileSync(
join(resourcesDir, MAC_BUILD_COMPATIBILITY_FILENAME),
`${JSON.stringify(compatibility, null, 2)}\n`,
'utf8'
)View on GitHub (pinned to 1136503c6a)
Solutions
- Pass exactly 'arm64' or 'x64' to createMacBuildCompatibility.
- Normalize upstream: map process.arch/process.env targets to the two accepted values before calling.
- If a universal build is needed, write two descriptors (one per arch) rather than inventing a third value.
Example fix
// before
createMacBuildCompatibility({ version, commit, architecture: 'arm' })
// after
createMacBuildCompatibility({ version, commit, architecture: 'arm64' }) Defensive patterns
Strategy: type-guard
Validate before calling
const MAC_ARCHS = ['arm64', 'x64']
if (!MAC_ARCHS.includes(architecture)) {
throw new Error(`architecture must be one of ${MAC_ARCHS.join(',')}, got ${architecture}`)
} Type guard
const isMacArch = (a) => a === 'arm64' || a === 'x64'
Prevention
- Normalize process.arch to the accepted set before calling.
- Emit one descriptor per concrete arch rather than a 'universal' label.
- Add a unit test covering arm64/x64 plus a rejection case.
When it happens
Trigger: Calling createMacBuildCompatibility with architecture set to a value other than 'arm64'/'x64' — e.g. 'arm', 'x86_64', 'universal', undefined, or a process.arch like 'ia32'.
Common situations: Passing process.arch from a non-Mac host (e.g. 'linux' or 'win32'), using a universal-build label that the contract does not model, or a build matrix variable emitting the wrong arch string.
Related errors
- Unsupported local-build compatibility architecture: ${contex
- The production watchdog is macOS-only; run this benchmark on
- Renderer manifest is missing entry: ${key}
- Renderer entry ${sourceEntry} executes entry ${dependency}
- Invalid renderer output path: ${String(outputPath)}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/8257418e90f87749.
Report an issue: GitHub.