{"record":{"id":"7c5e1525c1c42e9e","repo":"thedotmack/claude-mem","slug":"uv-installation-completed-but-binary-not-found-pl","errorCode":null,"errorMessage":"uv installation completed but binary not found. Please restart your terminal and try again.","messagePattern":"uv installation completed but binary not found\\. Please restart your terminal and try again\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/npx-cli/install/setup-runtime.ts","lineNumber":239,"sourceCode":"\n/** Run the platform-specific uv installer, then confirm the binary is resolvable. */\nfunction runUvInstaller(): void {\n  if (IS_WINDOWS) {\n    execSync('powershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"', {\n      stdio: 'pipe',\n      timeout: INSTALL_TIMEOUT_MS,\n      shell: process.env.ComSpec ?? 'cmd.exe',\n    });\n  } else {\n    execSync('curl -LsSf https://astral.sh/uv/install.sh | sh', {\n      stdio: 'pipe',\n      timeout: INSTALL_TIMEOUT_MS,\n      shell: '/bin/bash',\n    });\n  }\n\n  if (!isUvInstalled()) {\n    throw new Error(\n      'uv installation completed but binary not found. Please restart your terminal and try again.',\n    );\n  }\n}\n\nfunction installUv(): void {\n  try {\n    runUvInstaller();\n  } catch (error) {\n    const err = error instanceof Error ? error : new Error(String(error));\n    const manualInstructions = IS_WINDOWS\n      ? '  - winget install astral-sh.uv\\n  - Or: powershell -c \"irm https://astral.sh/uv/install.ps1 | iex\"'\n      : '  - curl -LsSf https://astral.sh/uv/install.sh | sh\\n  - Or: brew install uv (macOS)';\n    throw new Error(\n      `Failed to install uv. Please install manually:\\n${manualInstructions}\\nThen restart your terminal and try again.\\n` +\n        `Underlying error: ${describeExecError(err)}`,\n    );\n  }","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/npx-cli/install/setup-runtime.ts#L221-L257","documentation":"Symmetric to the Bun check: after running the uv installer script, runUvInstaller re-checks isUvInstalled() and throws if the uv binary is still not found. It detects installer scripts that succeeded without putting uv on the current session's PATH.","triggerScenarios":"runUvInstaller's install command exits 0 but the follow-up isUvInstalled() check still returns false.","commonSituations":"uv installed to ~/.local/bin which is not on PATH, shell profile not reloaded, or installer silently skipped on an unsupported platform.","solutions":["Restart your terminal or source your profile so ~/.local/bin is on PATH, then re-run.","Verify with 'which uv'; if missing, reinstall manually: curl -LsSf https://astral.sh/uv/install.sh | sh","Add the uv install directory to PATH explicitly (e.g. export PATH=\"$HOME/.local/bin:$PATH\")."],"exampleFix":"// before\n$ claude-mem install   # throws: uv binary not found\n// after\n$ export PATH=\"$HOME/.local/bin:$PATH\"\n$ which uv   # then re-run installer","handlingStrategy":"fallback","validationCode":"import { execSync } from 'child_process';\nconst uvOnPath = (): boolean => { try { execSync('uv --version', { stdio: 'ignore' }); return true; } catch { return false; } };\nif (!uvOnPath()) console.warn('uv missing; ensure ~/.local/bin is on PATH');","typeGuard":"const hasUv = (p: string): boolean => existsSync(path.join(p, 'uv'));","tryCatchPattern":"try {\n  await ensureUv();\n} catch (e) {\n  if (String(e).includes('binary not found')) {\n    console.error('Add ~/.local/bin to PATH or install uv manually, then retry.');\n  }\n}","preventionTips":["Ensure ~/.local/bin is in PATH before running installers that need uv.","Verify 'uv --version' in a fresh shell after install.","Preinstall uv in CI images to skip the installer path."],"tags":["uv","python","path"],"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"}