/doctor reports non-existent npm-local installation at ~/.claude/local
Preflight Checklist
- [x] I have searched for existing issues and this bug has not been reported
- [x] This is a single bug report (separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
claude doctor reports a warning about a "Leftover npm local installation at ~/.claude/local" and suggests running rm -rf ~/.claude/local to fix it. However, this directory does not exist.
claude doctor
Diagnostics
└ Currently running: native (2.0.53)
└ Path: /home/username/.local/bin/claude
└ Invoked: /home/username/.local/share/claude/versions/2.0.53
└ Config install method: native
└ Auto-updates: default (true)
└ Search: OK (bundled)
Warning: Multiple installations found
└ npm-local at /home/username/.claude/local
└ native at /home/username/.local/bin/claude
Warning: Leftover npm local installation at /home/username/.claude/local
Fix: Run: rm -rf /home/username/.claude/local
What Should Happen?
claude doctor should only report warnings for installations that actually exist on the filesystem. If ~/.claude/local does not exist, no warning should be displayed.
Steps to Reproduce
- Have a native installation of Claude Code at
~/.local/bin/claude - Ensure
~/.claude/localdirectory does not exist - Run
claude doctor - Observe warning about non-existent npm-local installation
Investigation Details
Verification that directory does not exist
$ ls -la ~/.claude/local
ls: cannot access '/home/username/.claude/local': No such file or directory
$ ls -la ~/.claude/
total 100
drwxr-xr-x 11 username username 4096 Nov 10 22:01 .
drwxr-xr-x 52 username username 4096 Nov 26 09:06 ..
drwx------ 2 username username 4096 Nov 26 07:40 debug
drwxr-xr-x 2 username username 4096 Aug 18 10:08 downloads
drwxr-xr-x 2 username username 4096 Aug 15 16:33 ide
drwxr-xr-x 3 username username 4096 Aug 20 14:45 plugins
drwxr-xr-x 5 username username 4096 Nov 22 08:31 projects
drwxr-xr-x 4 username username 4096 Nov 26 09:03 session-env
drwxr-xr-x 2 username username 12288 Nov 26 07:40 shell-snapshots
drwxr-xr-x 2 username username 4096 Jun 21 15:42 statsig
drwxr-xr-x 2 username username 49152 Nov 26 07:40 todos
Additional checks performed
- No symlinks pointing to
local:find ~/.claude -type lreturns only~/.claude/debug/latest - No references in shell configs (
~/.zshrc,~/.bashrc,~/.profile) - No claude-related PATH entries pointing to
~/.claude/local - Environment variables:
CLAUDE_CONFIG_DIR=~/.config/claude - Changing
installMethodin~/.claude.jsonfrom"unknown"to"native"did not resolve the issue
npm cache history
npm cache contains previous Claude Code versions (1.0.17 - 1.0.83), suggesting previous usage via npx @anthropic-ai/claude-code. Current installation is native-only.
$ npm cache ls | grep claude | head -5
make-fetch-happen:request-cache:https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-1.0.17.tgz
...
Hypothesis
The detection logic in claude doctor appears to be checking for potential npm-local installation paths without actually verifying the directory exists on the filesystem. It may be inferring from npm cache history or other metadata rather than performing actual existence checks.
Is this a regression?
Unknown / Not sure
Claude Code Version
2.0.53 (Claude Code)
Platform
Anthropic API
Operating System
Linux (Gentoo on WSL2)
$ uname -a
Linux hostname 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 GNU/Linux
$ cat /etc/os-release | head -4
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
VERSION_ID="2.18"
Terminal/Shell
- Shell: zsh
- Terminal: xterm-256color (Windows Terminal via WSL2)
Additional Information
- Node.js: v22.14.0
- npm: 10.9.2
- Only one Claude installation exists (native at
~/.local/bin/claude→~/.local/share/claude/versions/2.0.53) - No npm global installation of
@anthropic-ai/claude-code
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗