{"record":{"id":"da558c89614e79f6","repo":"parcel-bundler/parcel","slug":"unsupported-os-platform-architecture-arch","errorCode":null,"errorMessage":"Unsupported OS: ${platform}, architecture: ${arch}","messagePattern":"Unsupported OS: (.+?), architecture: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/core/rust/index.js","lineNumber":316,"sourceCode":"        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.linux-s390x-gnu.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.linux-s390x-gnu.node');\n          } else {\n            nativeBinding = require('@parcel/rust-linux-s390x-gnu');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      default:\n        throw new Error(`Unsupported architecture on Linux: ${arch}`);\n    }\n    break;\n  default:\n    throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);\n}\n\nif (!nativeBinding) {\n  if (loadError) {\n    throw loadError;\n  }\n  throw new Error(`Failed to load native binding`);\n}\n\nconst {\n  findAncestorFile,\n  findFirstFile,\n  findNodeModule,\n  hashString,\n  hashBuffer,\n  Hash,\n  optimizeImage,\n  transformHtml,","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/rust/index.js#L298-L334","documentation":"Thrown by @parcel/rust's binding loader when process.platform is not one of android, win32, darwin, or freebsd/linux. The top-level switch has no case for the current platform, so it falls to default and reports both platform and arch to aid diagnosis.","triggerScenarios":"Running Parcel on an OS Node reports as something other than the supported set — e.g. 'aix', 'sunos', 'openbsd', 'netbsd', 'haiku', or a future/new platform string.","commonSituations":"Building on AIX/Solaris/BSD-other servers; experimental OS ports; CI on uncommon OS images; Node reporting a nonstandard platform due to a shim.","solutions":["Move the build to a supported OS (linux, darwin, win32) via a container or VM.","Check `node -p process.platform` to confirm what Node detects; fix the environment if misreported.","Build the native binding from source if a Rust toolchain exists for your OS.","Request upstream support or track the platform-compat issue."],"exampleFix":"# before: OpenBSD\n$ node -p process.platform\n'openbsd'  # error: Unsupported OS\n\n# after: build inside linux container\n$ docker run --rm -v \"$PWD\":/work -w /work node:20 parcel build","handlingStrategy":"validation","validationCode":"import { platform } from 'process';\nconst SUPPORTED_OS = new Set(['linux','darwin','win32','freebsd','android']);\nif (!SUPPORTED_OS.has(platform)) {\n  throw new Error(`Unsupported OS ${platform}; run Parcel in a linux/darwin/win32 VM.`);\n}","typeGuard":"type SupportedPlatform = 'linux'|'darwin'|'win32'|'freebsd'|'android';\nfunction isSupportedPlatform(p: string): p is SupportedPlatform {\n  return ['linux','darwin','win32','freebsd','android'].includes(p);\n}","tryCatchPattern":null,"preventionTips":["Run Parcel on a Tier-1 OS; use a container/VM otherwise.","Log process.platform in CI matrix setup to detect exotic runners.","Track upstream platform support before adopting a new OS."],"tags":["native-binding","platform","os-support","parcel-rust"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}