{"record":{"id":"3eb9e64abb9bcaa4","repo":"thedotmack/claude-mem","slug":"doctor-failed-to-probe-bin-version","errorCode":null,"errorMessage":"[doctor] Failed to probe `${bin} --version`:","messagePattern":"\\[doctor\\] Failed to probe `(.+?) --version`:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/npx-cli/commands/doctor.ts","lineNumber":32,"sourceCode":"import { resolveDataDir } from '../../shared/paths.js';\nimport { checkWindowsGitBash } from '../utils/windows-git-bash-preflight.js';\n\ntype CheckStatus = 'ok' | 'warn' | 'fail';\n\ninterface CheckResult {\n  name: string;\n  status: CheckStatus;\n  detail: string;\n  /** When false, a 'fail' does not affect the overall exit code. */\n  required: boolean;\n}\n\nfunction probeVersion(bin: 'bun' | 'uv'): string | null {\n  try {\n    return bin === 'bun' ? getBunVersion() : getUvVersion();\n  } catch (error) {\n    const err = error instanceof Error ? error : new Error(String(error));\n    console.warn(`[doctor] Failed to probe \\`${bin} --version\\`:`, err);\n    return null;\n  }\n}\n\nasync function probeWorkerHealth(workerHost: string, workerPort: string): Promise<{ status: CheckStatus; detail: string }> {\n  const workerUrl = `http://${workerHost}:${workerPort}`;\n  const res = await fetch(`${workerUrl}/api/health`, {\n    signal: AbortSignal.timeout(3000),\n  });\n  if (res.ok) {\n    return { status: 'ok', detail: `healthy at ${workerUrl}` };\n  }\n  return { status: 'warn', detail: `reachable but unhealthy (HTTP ${res.status}) at ${workerUrl}` };\n}\n\nexport async function runDoctorCommand(): Promise<void> {\n  const checks: CheckResult[] = [];\n  const dataDir = resolveDataDir();","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/8bc631a71a487424b866756e43a6efa4574cc66b/src/npx-cli/commands/doctor.ts#L14-L50","documentation":"A console.warn from claude-mem doctor's probeVersion: getBunVersion()/getUvVersion() threw while probing the binary. The doctor table then shows the dependency with a null version, and since bun/uv are required checks, the overall exit code reflects the miss. The throw usually means spawn of `bun --version` / `uv --version` failed, not merely a wrong version.","triggerScenarios":"Running `npx claude-mem doctor` on a machine where bun or uv is not installed, not on PATH for the current shell, not executable (permission bits), or fails to start on a weird architecture/OS.","commonSituations":"Fresh machine where only Node exists; bun installed via a user profile not sourced in non-login shells (CI, cron); Windows PATH lag after installer; corporate policies stripping execute bits from downloaded binaries.","solutions":["Install the missing runtime: curl -fsSL https://bun.sh/install | bash, or curl -LsSf https://astral.sh/uv/install.sh | sh","Reopen the shell or source the profile so ~/.bun/bin and ~/.local/bin are on PATH, then re-run doctor","Verify directly: `bun --version` and `uv --version` must both print in the same shell you run npx from"],"exampleFix":"# before\n$ npx claude-mem doctor\n[doctor] Failed to probe `bun --version`: Error: spawn bun ENOENT\n\n# after\n$ curl -fsSL https://bun.sh/install | bash\n$ exec $SHELL && bun --version\n1.1.x\n$ npx claude-mem doctor  # bun check now ok","handlingStrategy":"validation","validationCode":"import { spawnSync } from 'node:child_process';\nfunction runtimeOnPath(bin: 'bun' | 'uv'): boolean {\n  try { return spawnSync(bin, ['--version']).status === 0; } catch { return false; }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install bun and uv before the first claude-mem run on a new machine","Verify `bun --version` and `uv --version` succeed in the exact shell/CI context you run npx from","Source the profile in non-interactive shells so ~/.bun/bin and ~/.local/bin are on PATH"],"tags":["doctor","diagnostics","bun","uv","dependency-missing","spawn-enoent"],"backgroundTag":"missing-cli-dependency","analyzedSha":"8bc631a71a487424b866756e43a6efa4574cc66b","analyzedAt":"2026-08-20T23:58:13.836Z","contentChangedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}