{"record":{"id":"031a5a4968c89806","repo":"parcel-bundler/parcel","slug":"unsupported-architecture-on-windows-arch","errorCode":null,"errorMessage":"Unsupported architecture on Windows: ${arch}","messagePattern":"Unsupported architecture on Windows: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/core/rust/index.js","lineNumber":114,"sourceCode":"          loadError = e;\n        }\n        break;\n      case 'arm64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.win32-arm64-msvc.node'),\n        );\n        try {\n          if (localFileExisted) {\n            nativeBinding = require('./parcel-node-bindings.win32-arm64-msvc.node');\n          } else {\n            nativeBinding = require('@parcel/rust-win32-arm64-msvc');\n          }\n        } catch (e) {\n          loadError = e;\n        }\n        break;\n      default:\n        throw new Error(`Unsupported architecture on Windows: ${arch}`);\n    }\n    break;\n  case 'darwin':\n    localFileExisted = existsSync(\n      join(__dirname, 'parcel-node-bindings.darwin-universal.node'),\n    );\n    try {\n      if (localFileExisted) {\n        nativeBinding = require('./parcel-node-bindings.darwin-universal.node');\n      } else {\n        nativeBinding = require('@parcel/rust-darwin-universal');\n      }\n      break;\n    } catch {}\n    switch (arch) {\n      case 'x64':\n        localFileExisted = existsSync(\n          join(__dirname, 'parcel-node-bindings.darwin-x64.node'),","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/rust/index.js#L96-L132","documentation":"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.","triggerScenarios":"Running Parcel on Windows with process.arch reporting a value like 'ia32' (x86), 'arm', or any non-x64/arm64 identifier.","commonSituations":"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.","solutions":["Install 64-bit Node.js LTS (x64) for Windows and retry — verify `node -p process.arch` returns 'x64'.","If on ARM64 hardware, ensure you use an arm64 Node build so process.arch is 'arm64'.","Reinstall Parcel after switching Node so the correct @parcel/rust-win32-* optional dependency resolves.","Run the build inside WSL2 (linux-x64) if a native Windows arch is unavailable."],"exampleFix":"// before: 32-bit Node on Windows\n> node -p process.arch\n'ia32'  // triggers the error\n\n// after: install Node.js x64\n> node -p process.arch\n'x64'","handlingStrategy":"validation","validationCode":"import { platform, arch } from 'process';\nconst WIN_SUPPORTED = new Set(['x64','arm64']);\nif (platform === 'win32' && !WIN_SUPPORTED.has(arch)) {\n  console.error(`Install 64-bit Node for Windows; detected arch=${arch}`);\n  process.exit(1);\n}","typeGuard":"function isSupportedWindowsArch(a: string): boolean {\n  return a === 'x64' || a === 'arm64';\n}","tryCatchPattern":null,"preventionTips":["Standardize on Node.js x64 LTS for Windows CI and developer machines.","Check process.arch in onboarding scripts and fail fast with guidance.","Use WSL2 (linux x64) as a fallback when native Windows arch is unsupported."],"tags":["native-binding","windows","architecture","parcel-rust"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}