thedotmack/claude-mem · info
Claude Code is not installed. Claude-mem works best in Claud
Error message
Claude Code is not installed. Claude-mem works best in Claude Code, but also works with the IDEs below.
What it means
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.
Source
Thrown at src/npx-cli/commands/install.ts:608
if (!IS_WINDOWS) {
try {
applyClaudeCodePathSetupIfNeeded();
} catch (error: unknown) {
// [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.
log.warn(`Could not auto-apply PATH setup: ${error instanceof Error ? error.message : String(error)}`);
}
}
resolve(true);
});
});
}
async function promptForIDESelection(): Promise<string[]> {
let detectedIDEs = detectInstalledIDEs();
const claudeCodeInfo = detectedIDEs.find((ide) => ide.id === 'claude-code');
if (claudeCodeInfo && !claudeCodeInfo.detected) {
log.warn('Claude Code is not installed. Claude-mem works best in Claude Code, but also works with the IDEs below.');
const choice = await p.select<'install' | 'skip' | 'cancel'>({
message: 'Install Claude Code now?',
options: [
{ value: 'install', label: 'Yes — install Claude Code (recommended)' },
{ value: 'skip', label: 'No — pick another IDE below' },
{ value: 'cancel', label: 'Cancel installation' },
],
initialValue: 'install',
});
if (p.isCancel(choice) || choice === 'cancel') {
p.cancel('Installation cancelled.');
process.exit(0);
}
if (choice === 'install') {
if (await installClaudeCode()) {
detectedIDEs = detectInstalledIDEs();
}
}View on GitHub (pinned to e2d1df569a)
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.
Defensive patterns
Strategy: validation
Validate before calling
// Check before launching the installer non-interactively:
import { spawnSync } from 'node:child_process';
const has = (cmd: string): boolean =>
spawnSync('which', [cmd], { shell: process.platform === 'win32' }).status === 0;
if (!has('claude')) {
// expect this info warning; pre-install Claude Code or pre-select another IDE
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No supported IDEs detected — pick the one(s) you plan to use
- API key prompt cancelled — leaving existing configuration un
- Gateway setup cancelled — leaving existing configuration unt
- `server ${commandLabel}` is a server runtime command, but CL
- CLAUDE_MEM_SERVER_DATABASE_URL is required for `server ${com
AI-assisted analysis of thedotmack/claude-mem@e2d1df569a (2026-08-20).
Data as JSON: /api/errors/dc9e1f81a105cceb.
Report an issue: GitHub.