{"record":{"id":"ec03fb4b53924846","repo":"thedotmack/claude-mem","slug":"failed-to-install-uv-please-install-manually-m","errorCode":null,"errorMessage":"Failed to install uv. Please install manually:\n${manualInstructions}\nThen restart your terminal and try again.\nUnderlying error: ${describeExecError(err)}","messagePattern":"Failed to install uv\\. Please install manually:\n(.+?)\nThen restart your terminal and try again\\.\nUnderlying error: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/npx-cli/install/setup-runtime.ts","lineNumber":253,"sourceCode":"    });\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  }\n}\n\n/**\n * Subpath imports the bundled worker requires transitively (via\n * @modelcontextprotocol/sdk / @anthropic-ai/claude-agent-sdk). A stale/partial\n * install can leave the `zod` directory present while these subpath exports fail\n * to resolve — surfacing later as a runtime `Cannot find module 'zod/v3'`. We\n * assert them at install time so a broken closure fails LOUD here. Version-agnostic:\n * we resolve subpaths, never a pinned version.\n */\nconst ZOD_REQUIRED_SUBPATHS = ['zod/v3', 'zod/v4', 'zod/v4-mini'] as const;\n\nexport function verifyCriticalModules(targetDir: string): void {\n  const pkg = JSON.parse(readFileSync(join(targetDir, 'package.json'), 'utf-8'));","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/npx-cli/install/setup-runtime.ts#L235-L271","documentation":"installUv wraps any failure from runUvInstaller into an actionable error with platform-specific manual install instructions (winget/astral.sh PowerShell on Windows; curl/brew otherwise) plus the underlying error from describeExecError, so users can install uv by hand.","triggerScenarios":"runUvInstaller throws — network failure downloading the astral.sh installer, non-zero exit, timeout, or missing curl/sh on the system.","commonSituations":"Air-gapped or proxied environments, missing curl in slim Docker images, Windows without winget, or Homebrew not present on macOS.","solutions":["Install uv manually with the commands in the error message (curl -LsSf https://astral.sh/uv/install.sh | sh, winget, or brew).","Restart your terminal so uv is on PATH, then re-run the installer.","Read the 'Underlying error' line to fix the root cause (proxy, DNS, permissions) first."],"exampleFix":"// before\nnpx claude-mem install   # uv installer download fails\n// after\nbrew install uv   # macOS fallback, then re-run installer","handlingStrategy":"try-catch","validationCode":"const hasNetwork = await fetch('https://astral.sh', { method: 'HEAD' }).then(() => true).catch(() => false);\nif (!hasNetwork) console.warn('Network unavailable; install uv manually.');","typeGuard":null,"tryCatchPattern":"try {\n  await ensureUv();\n} catch (e) {\n  console.error(String(e)); // includes manual install commands and underlying cause\n  // offer: exec('curl -LsSf https://astral.sh/uv/install.sh | sh')\n}","preventionTips":["Preinstall uv in Docker/CI environments.","Ensure curl (or winget on Windows) exists before running the installer.","Check proxy settings for astral.sh reachability.","Fix the underlying error in the message before retrying."],"tags":["uv","installation","network"],"backgroundTag":"missing-dependency","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"}