{"record":{"id":"07784ee599b6a28f","repo":"affaan-m/ECC","slug":"unsupported-architecture-for-windows-architectu","errorCode":null,"errorMessage":"Unsupported architecture for Windows: ${architecture}","messagePattern":"Unsupported architecture for Windows: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/lib/nasiko-release.js","lineNumber":36,"sourceCode":"const MAX_METADATA_BYTES = 64 * 1024;\nconst SHA256_PATTERN = /^sha256:[a-f0-9]{64}$/;\n\nconst QUALIFIED_RELEASES = Object.freeze({\n  'v0.1.0': Object.freeze({\n    'linux/amd64': Object.freeze({ manifestDigest: 'sha256:0df748a40f3d714b6b6a3376a1d13a224c05bdb8d1628f31ace5a7bee8ceb9de', binaryDigest: 'sha256:94a2bcab2d3832257e0111480bb7c3dcac81d63a7ae9bac53206a92c0957ee0f' }),\n    'linux/arm64': Object.freeze({ manifestDigest: 'sha256:655021a129c7df4621a80d16ea4eab38018530bfe9a20da646641d9f4ac5c249', binaryDigest: 'sha256:85f9fa5cfbed6c276fce6df2d71e9d0c66d7d8e8d46a40297464833d38db7a7e' }),\n    'darwin/amd64': Object.freeze({ manifestDigest: 'sha256:b4188482621efd7da5a2ab630f653665ab5f80b9aceae448b6bb5fc93e003f06', binaryDigest: 'sha256:ed6232e0bb96a2dcfd86d3c25f86021091600d52f09250403a54528bfe8100a3' }),\n    'darwin/arm64': Object.freeze({ manifestDigest: 'sha256:ce7e54fa19f989a5d125c4409b3587ca9503bb5a07bc5ff223c60e0fbad437f0', binaryDigest: 'sha256:3c60f862b04eea1b9a633593b39f1a443d9ca2123cf3edfd150d313e95f3894b' }),\n    'windows/amd64': Object.freeze({ manifestDigest: 'sha256:0760fe1fc98e8fedb66796aaf891a1de9268af1338c5e88b949656fda5d9f045', binaryDigest: 'sha256:0f57672d24fc3c70e4cbbf22864e65b35b9978ddaae3793803841536e682929b' }),\n  }),\n});\n\nfunction normalizePlatform(platform = process.platform, architecture = process.arch) {\n  const osName = platform === 'win32' ? 'windows' : platform;\n  if (!['linux', 'darwin', 'windows'].includes(osName)) throw new Error(`Unsupported platform: ${platform}`);\n  const arch = architecture === 'x64' ? 'amd64' : architecture;\n  if (!['amd64', 'arm64'].includes(arch)) throw new Error(`Unsupported architecture: ${architecture}`);\n  if (osName === 'windows' && arch !== 'amd64') throw new Error(`Unsupported architecture for Windows: ${architecture}`);\n  return { os: osName, arch, binaryName: osName === 'windows' ? 'nasiko.exe' : 'nasiko' };\n}\n\nfunction getQualifiedRelease(version, platform = process.platform, architecture = process.arch) {\n  if (!/^v\\d+\\.\\d+\\.\\d+$/.test(String(version || ''))) {\n    throw new Error('Nasiko installation requires a pinned version such as v0.1.0; latest is not allowed.');\n  }\n  const normalized = normalizePlatform(platform, architecture);\n  const qualification = QUALIFIED_RELEASES[version]?.[`${normalized.os}/${normalized.arch}`];\n  if (!qualification) throw new Error(`Nasiko ${version} is not qualified for ${normalized.os}/${normalized.arch}.`);\n  return { version, ...normalized, ...qualification, license: LICENSE, sourceUrl: SOURCE_URL };\n}\n\nfunction digestBytes(bytes) {\n  return `sha256:${crypto.createHash('sha256').update(bytes).digest('hex')}`;\n}\n\nfunction assertDigest(bytes, expectedDigest, label) {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/nasiko-release.js#L18-L54","documentation":"normalizePlatform in scripts/lib/nasiko-release.js accepts arm64 in general, but Windows only has a windows/amd64 entry in QUALIFIED_RELEASES. This explicit check rejects the windows+arm64 combination up front with a Windows-specific message instead of letting it fall through to the generic 'not qualified' error. It fires when Node reports platform 'win32' with architecture 'arm64' (native Windows-on-ARM Node).","triggerScenarios":"Running the Nasiko installer under a native arm64 Node build on a Windows on ARM PC (Surface Pro X and similar), where process.platform === 'win32' and process.arch === 'arm64'. Also if a caller explicitly passes platform: 'win32', architecture: 'arm64'.","commonSituations":"Windows on ARM laptops used for development; arm64 Node installed by default via winget on WoA; CI images for windows-arm64 runners.","solutions":["Install the x64 Node build on the Windows on ARM machine (it runs under emulation and reports process.arch 'x64') and rerun the installer","Run the install inside WSL, which reports linux/arm64 and is qualified","Wait for or contribute a qualified windows/arm64 entry in QUALIFIED_RELEASES"],"exampleFix":"# before: native arm64 Node on Windows on ARM\n> node -p process.arch\narm64  # installer throws\n# after: install Node.js x64 (emulated on WoA)\n> node -p process.arch\nx64  # installer proceeds as windows/amd64","handlingStrategy":"validation","validationCode":"if (process.platform === 'win32' && process.arch === 'arm64') {\n  throw new Error('Nasiko has no windows/arm64 build; use x64 Node under emulation or WSL');\n}","typeGuard":"const isSupportedWindowsCombo = (p: string, a: string): boolean =>\n  !(p === 'win32' && a !== 'x64');","tryCatchPattern":"try {\n  await installNasiko({ version: 'v0.1.0' });\n} catch (error) {\n  if (/^Unsupported architecture for Windows:/.test(String(error.message))) {\n    // Route the user to x64 Node (emulated) or WSL; not retryable as-is.\n  }\n  throw error;\n}","preventionTips":["On Windows on ARM hosts, explicitly install the x64 Node MSI","Pin the Node architecture in provisioning scripts instead of accepting the default arch","Document the supported matrix (windows/amd64 only) next to install instructions"],"tags":["architecture","windows-arm64","install"],"backgroundTag":"unsupported-architecture","analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}