Why You Should Care
If you're using Claude Code on Windows and suddenly got this error this morning:
claude: The term 'claude' is not recognized...
Don't panic. It's not your fault. Claude Code auto-migrated to a new installation method, and you just need to add one PATH.
Time to fix: 2 minutes.
What Happened?
Claude Code automatically migrated from npm-based installation to native installation. The executable moved to a new location that's not in your PATH.
Before: C:\Users\[username]\AppData\Roaming\npm\
After: C:\Users\[username]\.local\bin\
The Quick Fix
Open PowerShell and run:
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Users\[username]\.local\bin", "User")
Replace [username] with your actual Windows username.
Restart PowerShell. Done.
Verify It Works
claude --version
If you see the version number, you're good to go.
Need It Working Right Now?
If you can't restart PowerShell yet, use the full path:
C:\Users\[username]\.local\bin\claude.exe
Or add it to PATH for the current session only:
$env:Path += ";C:\Users\[username]\.local\bin"
claude
GUI Method (If You Prefer)
- Press
Win + R - Type
sysdm.cpland hit Enter - Go to "Advanced" tab → "Environment Variables"
- Select "Path" under User variables → "Edit"
- Click "New"
- Add
C:\Users\[username]\.local\bin - Click OK on everything
- Restart PowerShell
Why Did This Happen?
According to the official docs:
"Some users may be automatically migrated to an improved installation method."
The native installation has benefits:
- No Node.js dependency
- More stable auto-updates
- Single executable file
Makes sense technically, but the surprise migration on a Monday morning? Not ideal.
A Note on Tool Updates
Here's the thing about auto-updates: they're great until they're not.
As a user, I don't check release notes for every tool I use daily. That's just reality. We only notice changes when something breaks.
The good news? The error message actually tells you what to do. I just needed to slow down and read it carefully.
Troubleshooting
Still not working?
Check if the path is correct:
where.exe claude.exe
Want to verify PATH was added?
$env:Path -split ';' | Select-String "\.local\\bin"
Last resort - reinstall:
irm https://claude.ai/install.ps1 | iex
Takeaway
If Claude Code suddenly stops working on Windows:
- It probably auto-migrated to native installation
- Add
C:\Users\[username]\.local\binto PATH - Restart PowerShell
Two minutes to fix, but 30 minutes to figure out why it happened in the first place.
Hope this saves you some time.
More thoughts on technical decision-making processes at:
https://tielec.blog/
Top comments (0)