parcel-bundler/parcel · critical · Error
Unsupported OS: ${platform}, architecture: ${arch}
Error message
Unsupported OS: ${platform}, architecture: ${arch} What it means
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.
Source
Thrown at packages/core/rust/index.js:316
localFileExisted = existsSync(
join(__dirname, 'parcel-node-bindings.linux-s390x-gnu.node'),
);
try {
if (localFileExisted) {
nativeBinding = require('./parcel-node-bindings.linux-s390x-gnu.node');
} else {
nativeBinding = require('@parcel/rust-linux-s390x-gnu');
}
} catch (e) {
loadError = e;
}
break;
default:
throw new Error(`Unsupported architecture on Linux: ${arch}`);
}
break;
default:
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);
}
if (!nativeBinding) {
if (loadError) {
throw loadError;
}
throw new Error(`Failed to load native binding`);
}
const {
findAncestorFile,
findFirstFile,
findNodeModule,
hashString,
hashBuffer,
Hash,
optimizeImage,
transformHtml,View on GitHub (pinned to 59484858a1)
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.
Example fix
# before: OpenBSD $ node -p process.platform 'openbsd' # error: Unsupported OS # after: build inside linux container $ docker run --rm -v "$PWD":/work -w /work node:20 parcel build
Defensive patterns
Strategy: validation
Validate before calling
import { platform } from 'process';
const SUPPORTED_OS = new Set(['linux','darwin','win32','freebsd','android']);
if (!SUPPORTED_OS.has(platform)) {
throw new Error(`Unsupported OS ${platform}; run Parcel in a linux/darwin/win32 VM.`);
} Type guard
type SupportedPlatform = 'linux'|'darwin'|'win32'|'freebsd'|'android';
function isSupportedPlatform(p: string): p is SupportedPlatform {
return ['linux','darwin','win32','freebsd','android'].includes(p);
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Building on AIX/Solaris/BSD-other servers; experimental OS ports; CI on uncommon OS images; Node reporting a nonstandard platform due to a shim.
Related errors
- Unsupported architecture on Android ${arch}
- Unsupported architecture on Windows: ${arch}
- Unsupported architecture on macOS: ${arch}
- Unsupported architecture on FreeBSD: ${arch}
- Unsupported architecture on Linux: ${arch}
AI-assisted analysis of parcel-bundler/parcel@59484858a1 (2026-08-13).
Data as JSON: /api/errors/da558c89614e79f6.
Report an issue: GitHub.