{"record":{"id":"5245e6179bf794ea","repo":"multica-ai/multica","slug":"package-all-platforms-is-only-supported-on-mac","errorCode":null,"errorMessage":"[package] --all-platforms is only supported on macOS hosts (current: ${platform})","messagePattern":"\\[package\\] --all-platforms is only supported on macOS hosts \\(current: (.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/desktop/scripts/package.mjs","lineNumber":273,"sourceCode":"\n  return {\n    allPlatforms,\n    sharedArgs,\n    platformTargets,\n    requestedPlatforms: uniqueOrdered(requestedPlatforms),\n    requestedArchs: uniqueOrdered(requestedArchs),\n  };\n}\n\nexport function resolveBuildMatrix(parsed, platform = process.platform, arch = process.arch) {\n  if (parsed.allPlatforms) {\n    if (parsed.requestedPlatforms.length > 0 || parsed.requestedArchs.length > 0) {\n      throw new Error(\n        \"[package] --all-platforms cannot be combined with explicit platform or arch flags\",\n      );\n    }\n    if (platform !== \"darwin\") {\n      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(","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/apps/desktop/scripts/package.mjs#L255-L291","documentation":"Thrown by resolveBuildMatrix when --all-platforms is used on a host whose process.platform is not darwin. The all-platforms matrix builds every macOS target (universal/x64/arm64 via MAC_ALL_PLATFORM_TARGETS) and is only supported on macOS hosts — cross-compiling the full matrix from Linux/Windows is not implemented, so the script fails fast with the detected platform name in the message.","triggerScenarios":"Running `node scripts/package.mjs --all-platforms` on a Linux CI runner or Windows workstation; a CI pipeline that reuses the release command on a non-macOS job.","commonSituations":"Release automation where one job template is shared across runner OSes; developers on Linux attempting a full release build locally.","solutions":["Run the --all-platforms packaging step only on a macOS runner/host (e.g. guard the CI job with runs-on: macos-latest).","On non-macOS hosts, build for the host platform only (omit flags) or enumerate explicit cross-compilable targets.","Split release jobs per OS and keep --all-platforms exclusively in the macOS job."],"exampleFix":"# before (linux job)\n- run: node apps/desktop/scripts/package.mjs --all-platforms\n\n# after\nall_platforms:\n  runs-on: macos-latest\n  steps:\n    - run: node apps/desktop/scripts/package.mjs --all-platforms","handlingStrategy":"validation","validationCode":"// Guard in the calling script\nif (process.platform !== \"darwin\" && argv.allPlatforms) {\n  console.error(\"--all-platforms requires a macOS host; building host targets instead\");\n  delete argv.allPlatforms;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the all-platforms job to runs-on: macos-latest in CI.","Condition release scripts on process.platform before selecting the --all-platforms path."],"tags":["build","packaging","desktop","platform","ci","node"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}