can1357/oh-my-pi · error · Error
Unsupported architecture: ${arch}
Error message
Unsupported architecture: ${arch} What it means
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.
Source
Thrown at packages/coding-agent/src/cli/update-cli.ts:1115
os = "darwin";
break;
case "win32":
os = "windows";
break;
default:
throw new Error(`Unsupported platform: ${platform}`);
}
let archName: string;
switch (arch) {
case "x64":
archName = "x64";
break;
case "arm64":
archName = "arm64";
break;
default:
throw new Error(`Unsupported architecture: ${arch}`);
}
if (os === "windows") {
return `${APP_NAME}-${os}-${archName}.exe`;
}
return `${APP_NAME}-${os}-${archName}`;
}
/**
* Resolve the path that `omp` maps to in the user's PATH.
*/
function resolveOmpPath(): string | undefined {
return $which(APP_NAME) ?? undefined;
}
/**
* Parse the version a launcher reports from `omp --version` output
* (`omp/X.Y.Z`, or a prerelease such as `omp/X.Y.Z-canary.1`).View on GitHub (pinned to 9690622007)
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
Example fix
// before (riscv64 board) omp update // Unsupported architecture: riscv64 // after bun install -g @oh-my-pi/pi-coding-agent@latest
Defensive patterns
Strategy: validation
Validate before calling
const supportedArchs = new Set(["x64", "arm64"]);
if (!supportedArchs.has(process.arch)) {
console.error(`No binary release for ${process.arch}; use npm/bun install instead.`);
} Try / catch
try {
await runUpdate();
} catch (err) {
if (String(err?.message).startsWith("Unsupported architecture:")) {
console.error("Binary updates unsupported on this arch; install via npm/bun.");
return;
}
throw err;
} Prevention
- 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`
When it happens
Trigger: Running `omp update` on a machine whose process.arch is not "x64" or "arm64" — e.g. ia32, ppc64, s390x, riscv64, or mips.
Common situations: Older 32-bit Linux installs, POWER/Z mainframe Linux, RISC-V dev boards, or emulation environments reporting unusual arch values.
Related errors
- Unsupported platform: ${platform}
- ${formatVerificationFailure(verification, options.expectedVe
- Timed out fetching release info for ${pkg} after ${Math.roun
- Failed to fetch release info for ${pkg}: ${response.statusTe
- Malformed npm registry response for ${pkg}: missing version
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/dfc2ee89b81fbd5f.
Report an issue: GitHub.