{"record":{"id":"c91b0c6277a6dd2b","repo":"Yeachan-Heo/oh-my-codex","slug":"sparkshell-native-binary-not-found-checked-pa","errorCode":null,"errorMessage":"[sparkshell] native binary not found. Checked ${packagedCandidates.join(', ')}, ${repoLocal}, and ${nestedRepoLocal}. Set ${OMX_SPARKSHELL_BIN_ENV} to override the path.","messagePattern":"\\[sparkshell\\] native binary not found\\. Checked (.+?), (.+?), and (.+?)\\. Set (.+?) to override the path\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/sparkshell.ts","lineNumber":134,"sourceCode":"  } = options;\n\n  const override = env[OMX_SPARKSHELL_BIN_ENV]?.trim();\n  if (override) {\n    return isAbsolute(override) ? override : resolve(cwd, override);\n  }\n\n  for (const packaged of packagedSparkShellBinaryCandidatePaths(packageRoot, platform, arch, env, linuxLibcPreference)) {\n    if (exists(packaged)) return packaged;\n  }\n\n  const repoLocal = repoLocalSparkShellBinaryPath(packageRoot, platform);\n  if (exists(repoLocal)) return repoLocal;\n\n  const nestedRepoLocal = nestedRepoLocalSparkShellBinaryPath(packageRoot, platform);\n  if (exists(nestedRepoLocal)) return nestedRepoLocal;\n\n  const packagedCandidates = packagedSparkShellBinaryCandidatePaths(packageRoot, platform, arch, env, linuxLibcPreference);\n  throw new Error(\n    `[sparkshell] native binary not found. Checked ${packagedCandidates.join(', ')}, ${repoLocal}, and ${nestedRepoLocal}. `\n      + `Set ${OMX_SPARKSHELL_BIN_ENV} to override the path.`\n  );\n}\n\nexport async function resolveSparkShellBinaryPathWithHydration(\n  options: ResolveSparkShellBinaryPathOptions = {},\n): Promise<string> {\n  const {\n    cwd = process.cwd(),\n    env = process.env,\n    packageRoot = getPackageRoot(),\n    platform = process.platform,\n    arch = osArch(),\n    linuxLibcPreference,\n    exists = existsSync,\n  } = options;\n","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/sparkshell.ts#L116-L152","documentation":"The sparkshell native binary could not be located in any search location: packaged candidate paths, the repo-local path, and the nested repo-local path. The env var OMX_SPARKSHELL_BIN_ENV can override the lookup.","triggerScenarios":"resolveSparkShellBinaryPath finding no file at any packagedSparkShellBinaryCandidatePaths entry, repoLocal, or nestedRepoLocal — typically an npm install that skipped platform optional dependencies or a git checkout without a built binary.","commonSituations":"`npm install --no-optional` or `--omit=optional` excluding the platform-specific binary package, unsupported platform/arch, corrupted install, or running from a repo without building the native binary.","solutions":["Set the sparkshell bin env var (OMX_SPARKSHELL_BIN) to an existing binary path","Reinstall without omitting optional dependencies: `npm install` (ensure platform optional dep installed)","Check the packaged candidate paths listed in the message exist for your platform/arch; rebuild or download the native binary if missing"],"exampleFix":"# before\nomx sparkshell -- echo hi\n# after\nOMX_SPARKSHELL_BIN=/usr/local/bin/omx-sparkshell omx sparkshell -- echo hi","handlingStrategy":"fallback","validationCode":"import { existsSync } from 'node:fs';\nconst bin = process.env.OMX_SPARKSHELL_BIN;\nif (!bin || !existsSync(bin)) { /* install platform optional deps or point env var at a real binary */ }","typeGuard":null,"tryCatchPattern":"catch (e) { if (String(e).includes('[sparkshell] native binary not found')) { /* set OMX_SPARKSHELL_BIN or reinstall with optional deps */ } else throw e; }","preventionTips":["Never install with --no-optional / --omit=optional","Verify the platform binary package is present after install in CI"],"tags":["native-binary","sparkshell","installation","optional-dependencies"],"backgroundTag":"native-binary-not-found","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}