{"record":{"id":"7d935cf7545a31da","repo":"thedotmack/claude-mem","slug":"claude-mem-uv-version-probe-failed","errorCode":null,"errorMessage":"claude-mem: uv --version probe failed:","messagePattern":"claude-mem: uv --version probe failed:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/npx-cli/install/setup-runtime.ts","lineNumber":165,"sourceCode":"\nfunction getUvPath(): string | null {\n  return getToolPath('uv', uvCommonPaths());\n}\n\nfunction isUvInstalled(): boolean {\n  return getUvPath() !== null;\n}\n\nexport function getUvVersion(): string | null {\n  const uvPath = getUvPath();\n  if (!uvPath) return null;\n\n  try {\n    const result = spawnVersionProbe(uvPath, ['--version']);\n    return result.status === 0 ? result.stdout.trim() : null;\n  } catch (error) {\n    const err = error instanceof Error ? error : new Error(String(error));\n    console.warn('claude-mem: uv --version probe failed:', err);\n    return null;\n  }\n}\n\nfunction describeExecError(error: unknown): string {\n  if (error && typeof error === 'object') {\n    const e = error as { message?: string; stdout?: Buffer | string; stderr?: Buffer | string };\n    const parts: string[] = [];\n    if (e.message) parts.push(e.message);\n    const stderr = e.stderr ? e.stderr.toString().trim() : '';\n    if (stderr) parts.push(`stderr: ${stderr}`);\n    const stdout = e.stdout ? e.stdout.toString().trim() : '';\n    if (!stderr && stdout) parts.push(`stdout: ${stdout}`);\n    return parts.join('\\n');\n  }\n  return String(error);\n}\n","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/npx-cli/install/setup-runtime.ts#L147-L183","documentation":"getUvVersion probes the uv tool by spawning `uv --version` and returns null when the probe throws. The warning tells you the uv binary could not be spawned at the resolved path, so uv-dependent steps (Chroma runtime) will be treated as unavailable.","triggerScenarios":"spawnVersionProbe(uvPath, ['--version']) throws: uv not on PATH or at any of the common uv paths, binary not executable, or spawn fails due to environment restrictions.","commonSituations":"uv never installed; uv installed via pip/cargo into a venv not on PATH; PATH differs between interactive shell and the process invoking this code; permission issues on the binary.","solutions":["Install uv (curl -LsSf https://astral.sh/uv/install.sh | sh) and ensure its bin dir is on PATH","Run `uv --version` manually to confirm it resolves in the target environment","Provide the correct uv path if it lives outside the common paths this code checks","Fix permissions on the uv binary if EACCES"],"exampleFix":"// before\nconst result = spawnVersionProbe(uvPath, ['--version']);\n// after\nif (!uvPath) {\n  console.warn('claude-mem: uv not found on PATH');\n  return null;\n}\nconst result = spawnVersionProbe(uvPath, ['--version']);","handlingStrategy":"fallback","validationCode":"const probe = spawnSync('uv', ['--version']);\nif (probe.error || probe.status !== 0) console.warn('uv unavailable; install it for Chroma support');","typeGuard":"function hasUv(): boolean {\n  try { return spawnVersionProbe(uvPath, ['--version']).status === 0; } catch { return false; }\n}","tryCatchPattern":"try {\n  const v = getUvVersion();\n  if (v === null) throw new Error('uv version unavailable');\n} catch (e) {\n  // install uv or disable uv-dependent features\n}","preventionTips":["Install uv as part of environment bootstrap","Check `uv --version` in the exact environment that runs the installer","Avoid relying on venv-local uv binaries for system-wide tools"],"tags":["runtime","uv","version-probe","spawn"],"backgroundTag":"command-not-found","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}