{"record":{"id":"49d2cfaa0d1c3c93","repo":"multica-ai/multica","slug":"package-unsupported-desktop-cli-architecture-s","errorCode":null,"errorMessage":"[package] unsupported Desktop CLI architecture(s): ${unsupported.join(\", \")}. Use --x64 or --arm64.","messagePattern":"\\[package\\] unsupported Desktop CLI architecture\\(s\\): (.+?)\\. Use --x64 or --arm64\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/desktop/scripts/package.mjs","lineNumber":291,"sourceCode":"      throw new Error(\n        `[package] --all-platforms is only supported on macOS hosts (current: ${platform})`,\n      );\n    }\n    return MAC_ALL_PLATFORM_TARGETS.map((target) => ({ ...target }));\n  }\n\n  const platforms =\n    parsed.requestedPlatforms.length > 0\n      ? parsed.requestedPlatforms\n      : [hostPlatformKey(platform)];\n  const archs =\n    parsed.requestedArchs.length > 0\n      ? parsed.requestedArchs\n      : [hostArchKey(arch)];\n\n  const unsupported = archs.filter((value) => !SUPPORTED_CLI_ARCHS.has(value));\n  if (unsupported.length > 0) {\n    throw new Error(\n      `[package] unsupported Desktop CLI architecture(s): ${unsupported.join(\", \")}. ` +\n        \"Use --x64 or --arm64.\",\n    );\n  }\n\n  return platforms.flatMap((targetPlatform) =>\n    archs.map((targetArch) => ({\n      platform: targetPlatform,\n      arch: targetArch,\n    })),\n  );\n}\n\nfunction formatTarget(target) {\n  return `${PLATFORM_CONFIG[target.platform].label} ${target.arch}`;\n}\n\nexport function builderArgsForTarget(","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/apps/desktop/scripts/package.mjs#L273-L309","documentation":"Thrown by resolveBuildMatrix when any requested arch is not in SUPPORTED_CLI_ARCHS (currently {x64, arm64}). The requested archs come from CLI flags normalized by hostArchKey, so this fires for misspelled/unsupported values like --ia32, --armv7l, or a typo such as --x86_64. The message lists all offending values and points to the supported flags.","triggerScenarios":"Passing `--ia32`, `--arm`, or any arch key outside x64/arm64 to package.mjs; hostArchKey mapping an unusual process.arch (e.g. a non-standard Node build) to a value not in the set; scripts hardcoding an arch string with the wrong casing.","commonSituations":"Porting packaging scripts from another project that supported 32-bit builds; CI matrices with stale arch names; newer/edge Node builds reporting uncommon process.arch values.","solutions":["Use --x64 or --arm64, the only supported Desktop CLI architectures.","Check the exact spelling/case of arch flags in npm scripts and CI matrices against SUPPORTED_CLI_ARCHS.","If you genuinely need another arch, extend SUPPORTED_CLI_ARCHS and the CLI build tooling together — the check exists because the toolchain cannot produce other arches."],"exampleFix":"# before\nnode apps/desktop/scripts/package.mjs --ia32\n\n# after\nnode apps/desktop/scripts/package.mjs --x64","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set([\"x64\", \"arm64\"]);\nconst bad = requestedArchs.filter((a) => !SUPPORTED.has(a));\nif (bad.length) {\n  console.error(`unsupported arch(s): ${bad.join(\", \")}; use --x64 or --arm64`);\n  process.exit(2);\n}","typeGuard":"function isSupportedArch(a: string): boolean {\n  return a === \"x64\" || a === \"arm64\";\n}","tryCatchPattern":null,"preventionTips":["Validate arch flags at the npm-script level before invoking package.mjs.","Keep CI matrices limited to x64/arm64 unless SUPPORTED_CLI_ARCHS is extended in lockstep with tooling."],"tags":["build","packaging","desktop","architecture","cli-args","node"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}