npm → standalone migration doesn't detect or warn about existing npm install
Resolved 💬 5 comments Opened Feb 17, 2026 by rocket289k Closed Mar 18, 2026
Description
When migrating from the npm-installed @anthropic-ai/claude-code to the standalone installer, the standalone installer does not detect or warn about an existing npm global installation. Both installations can coexist on PATH, leading to silent version conflicts where the user may unknowingly run the wrong version.
Expected Behavior
The standalone installer (or claude itself on first standalone run) should:
- Detect if
@anthropic-ai/claude-codeis installed globally via npm (checknpm list -g @anthropic-ai/claude-codeor look for shims in the npm global bin) - Warn the user that both versions exist and may conflict
- Offer to clean up the npm installation (or at minimum, instruct the user to run
npm uninstall -g @anthropic-ai/claude-code)
Actual Behavior
- No detection or warning occurs
- Both
claudebinaries can exist on PATH (e.g.,%APPDATA%\npm\claude.cmdfrom npm and%USERPROFILE%\.local\bin\claude.exefrom standalone) - Whichever appears first in PATH wins silently — the user may be running the old npm version without realizing it
- Version pinning (e.g., in
settings.json) may apply to one install but not the other, compounding confusion
Steps to Reproduce
- Install Claude Code via
npm install -g @anthropic-ai/claude-code - Later install the standalone version (e.g., via the installer or
curlmethod) - Run
where claude(Windows) orwhich -a claude(macOS/Linux) - Observe both binaries on PATH with no warning
Environment
- OS: Windows 11
- Claude Code: 2.1.44 (standalone)
- Node.js: v24.13.0
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗