jdx/mise · error

Unsupported OS ' '. Supported: linux, macos, windows…

Error message

Unsupported OS '{}'. Supported: linux, macos, windows, android

What it means

Raised by Platform::validate when the parsed platform's OS field is not one of the supported values: linux, macos, windows, android. The platform string parsed successfully but names an OS this library has no support for.

Solutions

  1. Use a supported OS name: linux, macos, windows, or android.
  2. Replace "darwin" with "macos" and "osx" with "macos".
  3. Fix typos in the platform string; check that the OS token isn't merged with the arch (e.g. "linux64" should be "linux-x64").

Example fix

// before
platform = "darwin-arm64"
// after
platform = "macos-arm64"
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_OS = new Set(["linux", "macos", "windows", "android"]);
function validateOs(os) {
  if (!SUPPORTED_OS.has(os)) throw new Error(`Unsupported OS "${os}"; use linux, macos, windows, or android`);
}

Type guard

function isSupportedOs(os) {
  return ["linux", "macos", "windows", "android"].includes(os);
}

Try / catch

try {
  platform.validate();
} catch (e) {
  if (String(e).startsWith("Unsupported OS")) {
    const aliases = { darwin: "macos", osx: "macos", mac: "macos", win: "windows", win32: "windows" };
    throw new Error(`Use a supported OS name; e.g. "${aliases[platform.os] || "linux"}" instead of "${platform.os}".`);
  } else throw e;
}

Prevention

When it happens

Trigger: Calling validate() on a Platform built with os set to anything else — e.g. parse("freebsd-x64") or parse("darwin-arm64") — during tool platform selection or manifest matching.

Common situations: Using "darwin" instead of "macos"; naming a less common OS (freebsd, illumos, solaris); typos like "linx" or "linux64" leaking an OS-looking token into the os field; quoting 'osx' from another tool's convention.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/ec7eaec22d674e66. Report an issue: GitHub.

Appendix: source

Thrown at src/platform.rs:79

    }

    pub(crate) fn libc(&self) -> Option<&str> {
        self.qualifier
            .as_deref()?
            .split('-')
            .find_map(|part| match part {
                "gnu" | "glibc" => Some("gnu"),
                "musl" => Some("musl"),
                _ => None,
            })
    }

    /// Validate that this platform is supported
    pub(crate) fn validate(&self) -> Result<()> {
        // Validate OS
        match self.os.as_str() {
            "linux" | "macos" | "windows" | "android" => {}
            _ => bail!(
                "Unsupported OS '{}'. Supported: linux, macos, windows, android",
                self.os
            ),
        }

        // Validate architecture
        match self.arch.as_str() {
            "x64" | "arm64" | "x86" | "loongarch64" | "riscv64" => {}
            _ => bail!(
                "Unsupported architecture '{}'. Supported: x64, arm64, x86, loongarch64, riscv64",
                self.arch
            ),
        }

        // Validate qualifier if present
        if let Some(qualifier) = &self.qualifier {
            match qualifier.as_str() {
                "gnu" | "glibc" | "musl" | "msvc" | "baseline" | "musl-baseline" => {}

View on GitHub (pinned to 533346cc37)