{"record":{"id":"dc9e1f81a105cceb","repo":"thedotmack/claude-mem","slug":"claude-code-is-not-installed-claude-mem-works-bes","errorCode":null,"errorMessage":"Claude Code is not installed. Claude-mem works best in Claude Code, but also works with the IDEs below.","messagePattern":"Claude Code is not installed\\. Claude-mem works best in Claude Code, but also works with the IDEs below\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/npx-cli/commands/install.ts","lineNumber":630,"sourceCode":"      if (!IS_WINDOWS) {\n        try {\n          applyClaudeCodePathSetupIfNeeded();\n        } catch (error: unknown) {\n          // [ANTI-PATTERN IGNORED]: the failure is already surfaced to the user via the interactive-aware log.warn wrapper below (p.log.warn in a TTY, console.warn otherwise); PATH setup is best-effort after a successful install.\n          log.warn(`Could not auto-apply PATH setup: ${error instanceof Error ? error.message : String(error)}`);\n        }\n      }\n      resolve(true);\n    });\n  });\n}\n\nasync function promptForIDESelection(): Promise<string[]> {\n  let detectedIDEs = detectInstalledIDEs();\n  const claudeCodeInfo = detectedIDEs.find((ide) => ide.id === 'claude-code');\n\n  if (claudeCodeInfo && !claudeCodeInfo.detected) {\n    log.warn('Claude Code is not installed. Claude-mem works best in Claude Code, but also works with the IDEs below.');\n    const choice = await p.select<'install' | 'skip' | 'cancel'>({\n      message: 'Install Claude Code now?',\n      options: [\n        { value: 'install', label: 'Yes — install Claude Code (recommended)' },\n        { value: 'skip', label: 'No — pick another IDE below' },\n        { value: 'cancel', label: 'Cancel installation' },\n      ],\n      initialValue: 'install',\n    });\n    if (p.isCancel(choice) || choice === 'cancel') {\n      p.cancel('Installation cancelled.');\n      process.exit(0);\n    }\n    if (choice === 'install') {\n      if (await installClaudeCode()) {\n        detectedIDEs = detectInstalledIDEs();\n      }\n    }","sourceCodeStart":612,"sourceCodeEnd":648,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/npx-cli/commands/install.ts#L612-L648","documentation":"During `claude-mem install`, promptForIDESelection detects installed IDEs; when Claude Code is present but not detected as installed, it logs this notice and prompts the user to either install Claude Code, pick another IDE, or cancel — because claude-mem works best in Claude Code.","triggerScenarios":"detectInstalledIDEs() returns an entry with id 'claude-code' whose detected flag is false: the claude executable is not found on PATH while running the installer.","commonSituations":"Claude Code not yet installed on the machine; installed via a version manager whose PATH is not active in the installer shell; npm global bin directory not on PATH; corrupted/partial Claude Code installation.","solutions":["Install Claude Code (npm install -g @anthropic-ai/claude-code) and re-run the installer","Ensure the npm global bin dir is on PATH (`npm config get prefix`/bin)","Choose 'skip' at the prompt to select another supported IDE instead","Choose 'install' at the prompt to let the installer install Claude Code automatically"],"exampleFix":"// before\n$ npx claude-mem install\n# claude not on PATH -> warning shown\n// after\n$ npm install -g @anthropic-ai/claude-code\n$ npx claude-mem install   # claude-code detected, warning gone","handlingStrategy":"validation","validationCode":"if (spawnSync('claude', ['--version']).status !== 0) {\n  console.warn('Claude Code not detected; it will be offered during install');\n}","typeGuard":"function isClaudeCodeDetected(ides: DetectedIDE[]): boolean {\n  return ides.some(i => i.id === 'claude-code' && i.detected);\n}","tryCatchPattern":"try {\n  const ides = await promptForIDESelection();\n} catch (e) {\n  if (e instanceof Error && e.message.includes('cancel')) {\n    // user aborted installation\n  }\n}","preventionTips":["Install Claude Code before running the installer for the best experience","Ensure npm global bin is on PATH so detection succeeds","Choose 'skip' deliberately if you intend to use a different IDE"],"tags":["installer","ide","claude-code","detection"],"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"}