[BUG] npm install shows "installMethod is native" warning on Windows
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When installing Claude Code via npm on Windows, the CLI displays a warning:
"installMethod is native, but claude command not found at C:\Users\<username>\.local\bin\claude.exe"
This occurs even though the installation was done via npm, not the native installer. The npm package incorrectly checks for the native install path regardless of installation method.
Steps to reproduce:
- Uninstall any existing Claude Code installation
- Delete ~/.claude directory to ensure clean state
- Run: npm install -g @anthropic-ai/claude-code
- Run: claude
Expected: No warnings, since npm installation doesn't use .local\bin
Actual: Warning about missing native install path
Version: 2.0.76
OS: Windows 11
Installation method: npm
What Should Happen?
No warnings, since npm installation doesn't use .local\bin
Error Messages/Logs
"installMethod is native, but claude command not found at C:\Users\<username>\.local\bin\claude.exe"
Steps to Reproduce
Steps to reproduce:
- Uninstall any existing Claude Code installation
- Delete ~/.claude directory to ensure clean state
- Run: npm install -g @anthropic-ai/claude-code
- Run: claude
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
<img width="2295" height="674" alt="Image" src="https://github.com/user-attachments/assets/32dcc71f-fbd3-4439-99dc-2994cfc45d5f" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗