oven-sh/bun · error

Unsupported platform

Error message

Unsupported platform: ${inspect(platform)}

What it means

Guard inside tart.mjs's getImage(): the CI VM-image lookup table only supports macOS guests on Apple Silicon, because the cirruslabs/macos-* templates that this function maps release codes (e.g. '15' -> sequoia) onto are xcode aarch64 images. Any platform tuple whose os is not 'darwin' or arch is not 'aarch64' hits this sentinel throw naming the unsupported platform.

Solutions

  1. Only request tart VMs for darwin/aarch64 targets
  2. Use docker.mjs for linux platforms
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at scripts/tart.mjs:48 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/38d9f70c5a997f71. Report an issue: GitHub.

Appendix: source

Thrown at scripts/tart.mjs:48

    } catch {
      return;
    }
  },

  /**
   * @typedef {"sequoia" | "sonoma" | "ventura" | "monterey"} TartDistro
   * @typedef {`ghcr.io/cirruslabs/macos-${TartDistro}-xcode`} TartImage
   * @link https://github.com/orgs/cirruslabs/packages?repo_name=macos-image-templates
   */

  /**
   * @param {Platform} platform
   * @returns {TartImage}
   */
  getImage(platform) {
    const { os, arch, release } = platform;
    if (os !== "darwin" || arch !== "aarch64") {
      throw new Error(`Unsupported platform: ${inspect(platform)}`);
    }
    const distros = {
      "15": "sequoia",
      "14": "sonoma",
      "13": "ventura",
      "12": "monterey",
    };
    const distro = distros[release];
    if (!distro) {
      throw new Error(`Unsupported macOS release: ${distro}`);
    }
    return `ghcr.io/cirruslabs/macos-${distro}-xcode`;
  },

  /**
   * @typedef {Object} TartVm
   * @property {string} Name
   * @property {"running" | "stopped"} State

View on GitHub (pinned to 8c5296ac45)