oven-sh/bun · error

Unsupported operating system: ${string}

Error message

Unsupported operating system: ${string}

What it means

Error "Unsupported operating system: ${string}" thrown in oven-sh/bun.

Source

Thrown at scripts/utils.mjs:1372

/**
 * @param {string} string
 * @returns {"darwin" | "linux" | "windows" | "freebsd"}
 */
export function parseOs(string) {
  if (/darwin|apple|mac/i.test(string)) {
    return "darwin";
  }
  if (/linux|android/i.test(string)) {
    return "linux";
  }
  if (/freebsd/i.test(string)) {
    return "freebsd";
  }
  if (/win/i.test(string)) {
    return "windows";
  }
  throw new Error(`Unsupported operating system: ${string}`);
}

/**
 * @returns {"darwin" | "linux" | "windows" | "freebsd"}
 */
export function getOs() {
  return parseOs(process.platform);
}

/**
 * @param {string} string
 * @returns {"x64" | "aarch64"}
 */
export function parseArch(string) {
  if (/x64|amd64|x86_64/i.test(string)) {
    return "x64";
  }
  if (/arm64|aarch64/i.test(string)) {

View on GitHub (pinned to 8c5296ac45)

When it happens

Trigger: Thrown at scripts/utils.mjs:1372 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/4078fbde7d79f438. Report an issue: GitHub.