{"record":{"id":"b533322ad713f468","repo":"tinyhumansai/openhuman","slug":"unsupported-arch-arch-on-platform","errorCode":null,"errorMessage":"Unsupported arch ${arch} on ${platform}","messagePattern":"Unsupported arch (.+?) on (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/npm/install.js","lineNumber":32,"sourceCode":"\nconst REPO = 'tinyhumansai/openhuman';\nconst pkg = require('./package.json');\nconst VERSION = pkg.version;\n\n// Maps process.platform + process.arch → Rust target triple\nconst TARGET_MAP = {\n  darwin: { x64: 'x86_64-apple-darwin', arm64: 'aarch64-apple-darwin' },\n  linux: { x64: 'x86_64-unknown-linux-gnu', arm64: 'aarch64-unknown-linux-gnu' },\n  win32: { x64: 'x86_64-pc-windows-msvc' },\n};\n\nfunction getTarget() {\n  const platform = process.platform;\n  const arch = process.arch;\n  const targets = TARGET_MAP[platform];\n  if (!targets) throw new Error(`Unsupported platform: ${platform}`);\n  const target = targets[arch];\n  if (!target) throw new Error(`Unsupported arch ${arch} on ${platform}`);\n  return { platform, target };\n}\n\nfunction httpsGet(url) {\n  return new Promise((resolve, reject) => {\n    function request(u) {\n      https.get(u, (res) => {\n        if (res.statusCode === 301 || res.statusCode === 302) {\n          return request(res.headers.location);\n        }\n        if (res.statusCode !== 200) {\n          res.resume();\n          return reject(new Error(`HTTP ${res.statusCode} fetching ${u}`));\n        }\n        const chunks = [];\n        res.on('data', (c) => chunks.push(c));\n        res.on('end', () => resolve(Buffer.concat(chunks)));\n        res.on('error', reject);","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/packages/npm/install.js#L14-L50","documentation":"The OS is supported but process.arch has no entry under TARGET_MAP[platform] — win32 supports only x64, linux and darwin x64/arm64 — so no prebuilt tarball matches the machine and installation aborts.","triggerScenarios":"Windows on ARM64 running an arm64 Node build (win32/arm64 is unmapped); linux ia32 or riscv64; any arch outside x64/arm64.","commonSituations":"Windows ARM laptops (Snapdragon) with native arm64 Node; 32-bit Node installed on a 64-bit Linux.","solutions":["Install an x64 Node build on Windows ARM (runs via emulation) so process.arch maps to x86_64-pc-windows-msvc","Verify what you have: node -p \"process.platform + ' ' + process.arch\"","Or build openhuman-core from source for the exotic arch and skip the download"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const ARCHES = { darwin: ['x64', 'arm64'], linux: ['x64', 'arm64'], win32: ['x64'] };\nconst ok = !!ARCHES[process.platform]?.includes(process.arch);\nif (!ok) console.error(`No prebuilt for ${process.arch} on ${process.platform}`);","typeGuard":"const hasPrebuiltArch = (p: string, a: string): boolean =>\n  ({ darwin: ['x64','arm64'], linux: ['x64','arm64'], win32: ['x64'] })[p]?.includes(a) ?? false;","tryCatchPattern":null,"preventionTips":["On Windows ARM, install x64 Node so the x86_64-pc-windows-msvc tarball is used","Verify with `node -p \"process.platform + ' ' + process.arch\"` before install","Prefer 64-bit Node everywhere; ia32 has no triple on any platform"],"tags":["npm","install","arch","prebuilt"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}