multica-ai/multica · warning

[package] --all-platforms is only supported on macOS hosts (

Error message

[package] --all-platforms is only supported on macOS hosts (current: ${platform})

What it means

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.

Source

Thrown at apps/desktop/scripts/package.mjs:273

  return {
    allPlatforms,
    sharedArgs,
    platformTargets,
    requestedPlatforms: uniqueOrdered(requestedPlatforms),
    requestedArchs: uniqueOrdered(requestedArchs),
  };
}

export function resolveBuildMatrix(parsed, platform = process.platform, arch = process.arch) {
  if (parsed.allPlatforms) {
    if (parsed.requestedPlatforms.length > 0 || parsed.requestedArchs.length > 0) {
      throw new Error(
        "[package] --all-platforms cannot be combined with explicit platform or arch flags",
      );
    }
    if (platform !== "darwin") {
      throw new Error(
        `[package] --all-platforms is only supported on macOS hosts (current: ${platform})`,
      );
    }
    return MAC_ALL_PLATFORM_TARGETS.map((target) => ({ ...target }));
  }

  const platforms =
    parsed.requestedPlatforms.length > 0
      ? parsed.requestedPlatforms
      : [hostPlatformKey(platform)];
  const archs =
    parsed.requestedArchs.length > 0
      ? parsed.requestedArchs
      : [hostArchKey(arch)];

  const unsupported = archs.filter((value) => !SUPPORTED_CLI_ARCHS.has(value));
  if (unsupported.length > 0) {
    throw new Error(

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Run the --all-platforms packaging step only on a macOS runner/host (e.g. guard the CI job with runs-on: macos-latest).
  2. On non-macOS hosts, build for the host platform only (omit flags) or enumerate explicit cross-compilable targets.
  3. Split release jobs per OS and keep --all-platforms exclusively in the macOS job.

Example fix

# before (linux job)
- run: node apps/desktop/scripts/package.mjs --all-platforms

# after
all_platforms:
  runs-on: macos-latest
  steps:
    - run: node apps/desktop/scripts/package.mjs --all-platforms
Defensive patterns

Strategy: validation

Validate before calling

// Guard in the calling script
if (process.platform !== "darwin" && argv.allPlatforms) {
  console.error("--all-platforms requires a macOS host; building host targets instead");
  delete argv.allPlatforms;
}

Prevention

When it happens

Trigger: 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.

Common situations: Release automation where one job template is shared across runner OSes; developers on Linux attempting a full release build locally.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/5245e6179bf794ea. Report an issue: GitHub.