{"record":{"id":"7dd623bb5d9fffd5","repo":"thedotmack/claude-mem","slug":"ctx-component-failed-during-ctx-phase-cau","errorCode":null,"errorMessage":"${ctx.component} failed during ${ctx.phase}: ${causeMessage(ctx.cause)}","messagePattern":"(.+?) failed during (.+?): (.+?)","errorType":"exception","errorClass":"InstallAbortError","httpStatus":null,"severity":"critical","filePath":"src/npx-cli/install/error-reporter.ts","lineNumber":123,"sourceCode":" * The single decision point. ABORT throws InstallAbortError (the top-level\n * handler prints + exits 1). Every other severity records to the summary and\n * returns.\n */\nexport function installerError(\n  severity: ErrorSeverity,\n  ctx: ErrorContext,\n  summary: InstallSummary,\n): void {\n  const dataDir = resolveDataDir();\n  const category = classifyError(ctx.cause, { component: ctx.component, phase: ctx.phase });\n  const remediation =\n    ctx.remediation ??\n    category.remediation({ platform: process.platform, dataDir });\n\n  switch (severity) {\n    case ErrorSeverity.ABORT: {\n      writeLastInstallError(category, ctx, remediation, dataDir);\n      throw new InstallAbortError(\n        `${ctx.component} failed during ${ctx.phase}: ${causeMessage(ctx.cause)}`,\n        { category, remediation, cause: ctx.cause },\n      );\n    }\n    case ErrorSeverity.FAIL_LOUD_PER_IDE: {\n      const ide = ctx.ide ?? ctx.component;\n      if (!summary.failedIDEs.includes(ide)) summary.failedIDEs.push(ide);\n      summary.warnings.push({\n        component: ide,\n        message: ctx.details ? `${causeMessage(ctx.cause)}\\n${ctx.details}` : causeMessage(ctx.cause),\n        remediation,\n      });\n      return;\n    }\n    case ErrorSeverity.WARN_CONTINUE: {\n      summary.warnings.push({\n        component: ctx.component,\n        message: causeMessage(ctx.cause),","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d768ba364302d12b76e69e4f021f0bb1d2d50ed6/src/npx-cli/install/error-reporter.ts#L105-L141","documentation":"The message of InstallAbortError thrown by installerError() when severity is ABORT — the single, central abort path for the installer. It aggregates the failing component and phase (e.g. 'bun-install' / 'setup-runtime') with the underlying cause message, and attaches a remediation + category for the top-level handler to print. Any ABORT-severity failure anywhere in install flows surfaces here.","triggerScenarios":"Any installerError(ErrorSeverity.ABORT, ...) call site: bun auto-install failure, uv auto-install failure (when vector search isn't opted out), bun/uv binary missing after install, or any component that calls installerError with ABORT. The error fires after writeLastInstallError persists diagnostics to ~/.claude-mem/last-install-error.json.","commonSituations":"Network-restricted environment where bun/uv can't be fetched. A partial install where the runtime binary isn't on PATH. Disk-full or permission errors during install. Any unrecoverable installer step.","solutions":["Read the component/phase in the message to localize the failing step, then read ~/.claude-mem/last-install-error.json for the categorized remediation.","Address the underlying cause (e.g. install bun/uv manually, free disk, fix permissions) per the remediation hint.","Re-run the installer; if the same ABORT recurs, capture last-install-error.json and report it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isInstallAbortError(e: unknown): e is Error {\n  return e instanceof Error && /failed during/.test(e.message);\n}","tryCatchPattern":"try {\n  await runInstall();\n} catch (e) {\n  if (e instanceof InstallAbortError) {\n    console.error(e.message);\n    console.error('Remediation:', e.remediation);\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Always read ~/.claude-mem/last-install-error.json after an ABORT for the categorized remediation.","Pre-install mandatory runtimes (bun/uv) manually in restricted networks to avoid ABORT.","Surface component/phase in logs so ABORTs are immediately localizable."],"tags":["install","abort","error-reporting","installer"],"backgroundTag":null,"analyzedSha":"d768ba364302d12b76e69e4f021f0bb1d2d50ed6","analyzedAt":"2026-08-12T23:52:55.241Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}