parcel-bundler/parcel · critical · Error

Unsupported architecture on Windows: ${arch}

Error message

Unsupported architecture on Windows: ${arch}

What it means

Thrown by @parcel/rust's binding loader when the platform is win32 but the CPU architecture is not one of the prebuilt targets (x64-msvc or arm64-msvc). The default branch in the win32 switch rejects any other arch string, preventing a failed/garbled native require downstream.

Source

Thrown at packages/core/rust/index.js:114

          loadError = e;
        }
        break;
      case 'arm64':
        localFileExisted = existsSync(
          join(__dirname, 'parcel-node-bindings.win32-arm64-msvc.node'),
        );
        try {
          if (localFileExisted) {
            nativeBinding = require('./parcel-node-bindings.win32-arm64-msvc.node');
          } else {
            nativeBinding = require('@parcel/rust-win32-arm64-msvc');
          }
        } catch (e) {
          loadError = e;
        }
        break;
      default:
        throw new Error(`Unsupported architecture on Windows: ${arch}`);
    }
    break;
  case 'darwin':
    localFileExisted = existsSync(
      join(__dirname, 'parcel-node-bindings.darwin-universal.node'),
    );
    try {
      if (localFileExisted) {
        nativeBinding = require('./parcel-node-bindings.darwin-universal.node');
      } else {
        nativeBinding = require('@parcel/rust-darwin-universal');
      }
      break;
    } catch {}
    switch (arch) {
      case 'x64':
        localFileExisted = existsSync(
          join(__dirname, 'parcel-node-bindings.darwin-x64.node'),

View on GitHub (pinned to 59484858a1)

Solutions

  1. Install 64-bit Node.js LTS (x64) for Windows and retry — verify `node -p process.arch` returns 'x64'.
  2. If on ARM64 hardware, ensure you use an arm64 Node build so process.arch is 'arm64'.
  3. Reinstall Parcel after switching Node so the correct @parcel/rust-win32-* optional dependency resolves.
  4. Run the build inside WSL2 (linux-x64) if a native Windows arch is unavailable.

Example fix

// before: 32-bit Node on Windows
> node -p process.arch
'ia32'  // triggers the error

// after: install Node.js x64
> node -p process.arch
'x64'
Defensive patterns

Strategy: validation

Validate before calling

import { platform, arch } from 'process';
const WIN_SUPPORTED = new Set(['x64','arm64']);
if (platform === 'win32' && !WIN_SUPPORTED.has(arch)) {
  console.error(`Install 64-bit Node for Windows; detected arch=${arch}`);
  process.exit(1);
}

Type guard

function isSupportedWindowsArch(a: string): boolean {
  return a === 'x64' || a === 'arm64';
}

Prevention

When it happens

Trigger: Running Parcel on Windows with process.arch reporting a value like 'ia32' (x86), 'arm', or any non-x64/arm64 identifier.

Common situations: Using a 32-bit Node.js (ia32) install on Windows; running under Windows on ARM with a misreported arch; legacy x86-only environments; CI images pinned to old Node x86 builds.

Related errors


AI-assisted analysis of parcel-bundler/parcel@59484858a1 (2026-08-13). Data as JSON: /api/errors/031a5a4968c89806. Report an issue: GitHub.