{"record":{"id":"dfc2ee89b81fbd5f","repo":"can1357/oh-my-pi","slug":"unsupported-architecture-arch","errorCode":null,"errorMessage":"Unsupported architecture: ${arch}","messagePattern":"Unsupported architecture: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/cli/update-cli.ts","lineNumber":1115,"sourceCode":"\t\t\tos = \"darwin\";\n\t\t\tbreak;\n\t\tcase \"win32\":\n\t\t\tos = \"windows\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported platform: ${platform}`);\n\t}\n\n\tlet archName: string;\n\tswitch (arch) {\n\t\tcase \"x64\":\n\t\t\tarchName = \"x64\";\n\t\t\tbreak;\n\t\tcase \"arm64\":\n\t\t\tarchName = \"arm64\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported architecture: ${arch}`);\n\t}\n\n\tif (os === \"windows\") {\n\t\treturn `${APP_NAME}-${os}-${archName}.exe`;\n\t}\n\treturn `${APP_NAME}-${os}-${archName}`;\n}\n\n/**\n * Resolve the path that `omp` maps to in the user's PATH.\n */\nfunction resolveOmpPath(): string | undefined {\n\treturn $which(APP_NAME) ?? undefined;\n}\n\n/**\n * Parse the version a launcher reports from `omp --version` output\n * (`omp/X.Y.Z`, or a prerelease such as `omp/X.Y.Z-canary.1`).","sourceCodeStart":1097,"sourceCodeEnd":1133,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/cli/update-cli.ts#L1097-L1133","documentation":"Thrown when mapping the running CPU architecture (process.arch) to a release asset name and the arch is not x64 or arm64. The binary release channel only publishes assets for these two architectures.","triggerScenarios":"Running `omp update` on a machine whose process.arch is not \"x64\" or \"arm64\" — e.g. ia32, ppc64, s390x, riscv64, or mips.","commonSituations":"Older 32-bit Linux installs, POWER/Z mainframe Linux, RISC-V dev boards, or emulation environments reporting unusual arch values.","solutions":["Install/update via npm/bun instead of the binary channel: npm install -g <pkg>","Build from source on the unsupported architecture","Run x64 binaries under an emulator (box64/rosetta-style) if the platform provides one","Verify with `node -p process.arch` and request the architecture upstream if widely needed"],"exampleFix":"// before (riscv64 board)\nomp update  // Unsupported architecture: riscv64\n// after\nbun install -g @oh-my-pi/pi-coding-agent@latest","handlingStrategy":"validation","validationCode":"const supportedArchs = new Set([\"x64\", \"arm64\"]);\nif (!supportedArchs.has(process.arch)) {\n  console.error(`No binary release for ${process.arch}; use npm/bun install instead.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runUpdate();\n} catch (err) {\n  if (String(err?.message).startsWith(\"Unsupported architecture:\")) {\n    console.error(\"Binary updates unsupported on this arch; install via npm/bun.\");\n    return;\n  }\n  throw err;\n}","preventionTips":["Run the binary distribution only on x64/arm64 machines","On 32-bit, POWER, s390x, or RISC-V systems install via npm/bun or build from source","Gate updater invocations in scripts on `process.arch`"],"tags":["architecture","unsupported-environment","updater","binary-install"],"backgroundTag":"unsupported-architecture","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}