parcel-bundler/parcel · critical · Error
Unsupported architecture on Linux: ${arch}
Error message
Unsupported architecture on Linux: ${arch} What it means
Thrown by @parcel/rust's binding loader on Linux when process.arch is not among the prebuilt Linux targets (x64, arm64, arm, armv7, mips64el, ppc64, s390x, etc.). After handling each known arch with a try/require, the default branch rejects anything unrecognized.
Source
Thrown at packages/core/rust/index.js:312
}
}
break;
case 's390x':
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,View on GitHub (pinned to 59484858a1)
Solutions
- Check `node -p process.arch` and compare against @parcel/rust supported Linux arches; switch to a supported one if possible.
- Build the native binding from source for your arch via cargo + the @parcel/rust crate.
- Run Parcel in a Docker image based on a supported arch (e.g. debian/amd64).
- Report/await an upstream prebuilt for your arch.
Example fix
# before: riscv64 Linux $ node -p process.arch 'riscv64' # no prebuilt -> error # after: run in an amd64 container $ docker run --platform linux/amd64 node:20 ...
Defensive patterns
Strategy: validation
Validate before calling
import { platform, arch } from 'process';
const LINUX_SUPPORTED = new Set(['x64','arm64','arm','armv7','mips64el','ppc64','s390x']);
if (platform === 'linux' && !LINUX_SUPPORTED.has(arch)) {
throw new Error(`Unsupported Linux arch ${arch}; see @parcel/rust prebuilt matrix.`);
} Type guard
const LINUX_SUPPORTED_ARCH = ['x64','arm64','arm','armv7','mips64el','ppc64','s390x'];
function isSupportedLinuxArch(a: string): boolean {
return LINUX_SUPPORTED_ARCH.includes(a);
} Prevention
- Match your runtime arch to the @parcel/rust prebuilt matrix.
- For emerging arches (riscv64/loongarch64), build from source or use an amd64 container.
- Verify node_modules contains @parcel/rust-linux-<arch> after install.
When it happens
Trigger: Running Parcel on Linux with a CPU arch for which no @parcel/rust-linux-* prebuilt exists — e.g. riscv64, loongarch64, or a misreported/unusual arch string.
Common situations: Emerging architectures (RISC-V, LoongArch), Alpine musl combos without a glibc variant, custom-compiled Node reporting nonstandard arches, or container runtimes that leak the wrong arch.
Related errors
- Unsupported architecture on Android ${arch}
- Unsupported architecture on Windows: ${arch}
- Unsupported architecture on macOS: ${arch}
- Unsupported architecture on FreeBSD: ${arch}
- Unsupported OS: ${platform}, architecture: ${arch}
AI-assisted analysis of parcel-bundler/parcel@59484858a1 (2026-08-13).
Data as JSON: /api/errors/07227fc2b8c5e701.
Report an issue: GitHub.