{"record":{"id":"ea81bf9e19f640e5","repo":"denoland/deno","slug":"unsupported-platform","errorCode":null,"errorMessage":"Unsupported platform: {} {}","messagePattern":"Unsupported platform: (.+?) (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/bundle/esbuild.rs","lineNumber":36,"sourceCode":"use crate::npm::CliNpmRegistryInfoProvider;\nuse crate::sys::CliSys;\n\npub const ESBUILD_VERSION: &str = \"0.25.5\";\n// Bump when helper acquisition semantics change so an existing executable is\n// reacquired under the new rules.\nconst ESBUILD_CACHE_VERSION: u8 = 1;\n\nfn esbuild_platform() -> &'static str {\n  match (std::env::consts::ARCH, std::env::consts::OS) {\n    (\"x86_64\", \"linux\") => \"linux-x64\",\n    (\"aarch64\", \"linux\") => \"linux-arm64\",\n    (\"x86_64\", \"macos\" | \"apple\") => \"darwin-x64\",\n    (\"aarch64\", \"macos\" | \"apple\") => \"darwin-arm64\",\n    (\"x86_64\", \"windows\") => \"win32-x64\",\n    (\"aarch64\", \"windows\") => \"win32-arm64\",\n    (\"x86_64\", \"android\") => \"android-x64\",\n    (\"aarch64\", \"android\") => \"android-arm64\",\n    _ => panic!(\n      \"Unsupported platform: {} {}\",\n      std::env::consts::ARCH,\n      std::env::consts::OS\n    ),\n  }\n}\n\npub async fn ensure_esbuild(\n  deno_dir: &DenoDir,\n  npmrc: &ResolvedNpmRc,\n  api: &Arc<CliNpmRegistryInfoProvider>,\n  workspace_link_packages: &WorkspaceNpmLinkPackagesRc,\n  tarball_cache: &Arc<TarballCache<CliNpmCacheHttpClient, CliSys>>,\n  npm_cache: &CliNpmCache,\n) -> Result<PathBuf, AnyError> {\n  let target = esbuild_platform();\n  let mut esbuild_path = deno_dir\n    .dl_folder_path()","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/tools/bundle/esbuild.rs#L18-L54","documentation":"Panic in cli/tools/bundle/esbuild.rs. The `deno bundle` command downloads a platform-specific esbuild binary (an npm package like @esbuild/linux-x64) chosen from a fixed table of arch/OS pairs. Only x86_64/aarch64 on linux, macOS (darwin), windows, and android are mapped; any other combination (e.g. riscv64, i686, freebsd, 32-bit arm) hits the wildcard arm and panics with the detected arch and OS.","triggerScenarios":"Running `deno bundle` on an unsupported platform, e.g. Debian riscv64, i686-linux, armv7, FreeBSD, or OpenBSD — any (ARCH, OS) outside the eight mapped esbuild target tuples.","commonSituations":"Users on niche/embedded architectures or BSD systems trying the bundler; containers with exotic base images (e.g. i386); CI on non-x64/arm runners.","solutions":["Run `deno bundle` on a supported platform (x64 or arm64 linux/macOS/Windows) or cross-bundle from there","Bundle with esbuild directly on the exotic host (install esbuild built for it, feed it Deno-resolved inputs)","Pre-bundle as a build step on a supported CI runner and ship the artifact"],"exampleFix":"# before (on riscv64 host)\ndeno bundle main.ts              # panic: Unsupported platform: riscv64 linux\n# after (on supported runner)\ndeno bundle main.ts --out dist/bundle.js   # then deploy dist/","handlingStrategy":"validation","validationCode":"// run before invoking the bundler in tooling\nconst supported = new Set([\n  'x86_64-linux','aarch64-linux','x86_64-darwin','aarch64-darwin',\n  'x86_64-windows','aarch64-windows','x86_64-android','aarch64-android',\n]);\nconst key = `${Deno.build.arch}-${Deno.build.os}`;\nif (!supported.has(key)) {\n  throw new Error(`deno bundle unsupported on ${key}; bundle on x64/arm64 linux/mac/win`);\n}","typeGuard":"const isEsbuildSupportedPlatform = (): boolean =>\n  ['x86_64', 'aarch64'].includes(Deno.build.arch) &&\n  ['linux', 'darwin', 'windows', 'android'].includes(Deno.build.os);","tryCatchPattern":null,"preventionTips":["Gate bundling in scripts on Deno.build.arch/os as shown","Run bundle steps on standard x64/arm64 CI runners and deploy artifacts to exotic hosts"],"tags":["deno-bundle","esbuild","platform-support","architecture"],"backgroundTag":"unsupported-platform","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}