thedotmack/claude-mem · warning
[doctor] Failed to probe `${bin} --version`:
Error message
[doctor] Failed to probe `${bin} --version`: What it means
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.
Source
Thrown at src/npx-cli/commands/doctor.ts:32
import { resolveDataDir } from '../../shared/paths.js';
import { checkWindowsGitBash } from '../utils/windows-git-bash-preflight.js';
type CheckStatus = 'ok' | 'warn' | 'fail';
interface CheckResult {
name: string;
status: CheckStatus;
detail: string;
/** When false, a 'fail' does not affect the overall exit code. */
required: boolean;
}
function probeVersion(bin: 'bun' | 'uv'): string | null {
try {
return bin === 'bun' ? getBunVersion() : getUvVersion();
} catch (error) {
const err = error instanceof Error ? error : new Error(String(error));
console.warn(`[doctor] Failed to probe \`${bin} --version\`:`, err);
return null;
}
}
async function probeWorkerHealth(workerHost: string, workerPort: string): Promise<{ status: CheckStatus; detail: string }> {
const workerUrl = `http://${workerHost}:${workerPort}`;
const res = await fetch(`${workerUrl}/api/health`, {
signal: AbortSignal.timeout(3000),
});
if (res.ok) {
return { status: 'ok', detail: `healthy at ${workerUrl}` };
}
return { status: 'warn', detail: `reachable but unhealthy (HTTP ${res.status}) at ${workerUrl}` };
}
export async function runDoctorCommand(): Promise<void> {
const checks: CheckResult[] = [];
const dataDir = resolveDataDir();View on GitHub (pinned to 8bc631a71a)
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
Example fix
# before $ npx claude-mem doctor [doctor] Failed to probe `bun --version`: Error: spawn bun ENOENT # after $ curl -fsSL https://bun.sh/install | bash $ exec $SHELL && bun --version 1.1.x $ npx claude-mem doctor # bun check now ok
Defensive patterns
Strategy: validation
Validate before calling
import { spawnSync } from 'node:child_process';
function runtimeOnPath(bin: 'bun' | 'uv'): boolean {
try { return spawnSync(bin, ['--version']).status === 0; } catch { return false; }
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- claude-mem: bun --version probe failed:
- claude-mem: uv --version probe failed:
- [install] Could not detect Claude Code version:
- Health check failed
- Deep probe failed at list stage
AI-assisted analysis of thedotmack/claude-mem@8bc631a71a (2026-08-20).
Data as JSON: /api/errors/3eb9e64abb9bcaa4.
Report an issue: GitHub.