{"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":608,"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":590,"sourceCodeEnd":626,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/e2d1df569a8f04075d40e92461128ece7cf04c82/src/npx-cli/commands/install.ts#L590-L626","documentation":"During `npx claude-mem install`, IDE detection found no `claude` binary on PATH. This is a friendly heads-up, not a failure: claude-mem works best with Claude Code but supports other IDEs, so the installer warns and then offers to install Claude Code, pick another IDE, or cancel.","triggerScenarios":"Running `npx claude-mem install` on a machine where `claude` is not on PATH — Claude Code never installed, installed via a Node version manager whose bin dir is not in this shell's PATH, or installed only for a different user.","commonSituations":"Fresh machine; Claude Code installed under an nvm/fnm Node prefix that a new shell does not load; CI/container environments; installing claude-mem for use with OpenCode or another supported IDE only.","solutions":["Accept the 'install' option in the prompt to let the installer set up Claude Code, then continue.","Or choose 'skip' and select the IDE you actually use (e.g. OpenCode) — claude-mem works with those too.","If Claude Code IS installed, fix PATH (`which claude`) and rerun `npx claude-mem install` so detection succeeds.","Install manually: `npm install -g @anthropic-ai/claude-code`, then rerun the installer."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check before launching the installer non-interactively:\nimport { spawnSync } from 'node:child_process';\nconst has = (cmd: string): boolean =>\n  spawnSync('which', [cmd], { shell: process.platform === 'win32' }).status === 0;\nif (!has('claude')) {\n  // expect this info warning; pre-install Claude Code or pre-select another IDE\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install Claude Code before claude-mem when you want the recommended path: `npm i -g @anthropic-ai/claude-code`.","Ensure version-manager bin dirs (nvm/fnm/volta) are on PATH in the shell that runs install.","In scripts, pass the IDE choice explicitly so the warning-and-prompt flow never blocks."],"tags":["install","detection","claude-code","cli"],"backgroundTag":"dependency-not-installed","analyzedSha":"e2d1df569a8f04075d40e92461128ece7cf04c82","analyzedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}