jdx/mise · error
Unsupported architecture
Error message
Unsupported architecture '{}'. Supported: x64, arm64, x86, loongarch64, riscv64 What it means
Raised by Platform::validate when the parsed platform's architecture field is not one of the supported values: x64, arm64, x86, loongarch64, riscv64. The platform parsed fine but names an architecture without backend support.
Solutions
- Use the supported arch names: x64 (not amd64/x86_64), arm64 (not aarch64), x86 (not i386/686).
- For 64-bit ARM Linux with musl, use a qualifier: "linux-arm64-musl".
- If your target architecture genuinely isn't supported (ppc64le, s390x, mips), build/host for a supported arch instead.
Example fix
// before platform = "linux-amd64" // after platform = "linux-x64"
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_ARCH = new Set(["x64", "arm64", "x86", "loongarch64", "riscv64"]);
const ARCH_ALIASES = { amd64: "x64", x86_64: "x64", aarch64: "arm64", i386: "x86", i686: "x86" };
function normalizeArch(arch) {
const a = ARCH_ALIASES[arch] ?? arch;
if (!SUPPORTED_ARCH.has(a)) throw new Error(`Unsupported architecture "${arch}"`);
return a;
} Type guard
function isSupportedArch(arch) {
return ["x64", "arm64", "x86", "loongarch64", "riscv64"].includes(arch);
} Try / catch
try {
platform.validate();
} catch (e) {
if (String(e).startsWith("Unsupported architecture")) {
throw new Error(`Use x64/arm64/x86/loongarch64/riscv64 (e.g. amd64 -> x64, aarch64 -> arm64).`);
} else throw e;
} Prevention
- Normalize arch names from other ecosystems first: amd64/x86_64 -> x64, aarch64 -> arm64.
- Check target architecture support (ppc64le, s390x, mips are not supported) before configuring installs.
- Share a single platform-string constant table across scripts to avoid ad-hoc names.
When it happens
Trigger: Calling validate() on a Platform whose arch is outside the supported set — e.g. parse("linux-amd64"), parse("linux-aarch64"), parse("linux-armv7") — during platform validation.
Common situations: Using Go/Rust-style arch names (amd64, aarch64, x86_64) instead of this library's short names (x64, arm64, x86); typos like "arm" or "x86-64" splitting into unexpected parts; targeting genuinely unsupported architectures (ppc64le, s390x, mips).
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
- Unsupported OS ' '. Supported: linux, macos, windows…
- Unsupported qualifier
- encrypt an external dotfile source instead of configuration
- Invalid platform format
- precompiled erlang is not available
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/b4b99172b34166d7.
Report an issue: GitHub.
Appendix: source
Thrown at src/platform.rs:88
_ => 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" => {}
_ => bail!(
"Unsupported qualifier '{}'. Supported: gnu, glibc, musl, msvc, baseline, musl-baseline",
qualifier
),
}
}
Ok(())
}View on GitHub (pinned to 533346cc37)