[BUG] $HOME/.claude/local/node_modules/.bin/claude: No such file or directory when trying to run claude code
Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 5 comments · opened Sep 11, 2025 · closed Sep 14, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator)
responded on this thread — see the highlighted reply below.
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 trying to run Claude Code by using 'claude' in the terminal. I get the following error:
/Users/USER/.claude/local/claude: line 2: /Users/USER/.claude/local/node_modules/.bin/claude: No such file or directory
/Users/USER/.claude/local/claude: line 2: exec: /Users/USER/.claude/local/node_modules/.bin/claude: cannot execute: No such file or directory
This started occuring recently after having made changes to my mcp servers in claude_config. However, this could be largely unrelated as emptying this file has no effect. Claude Desktop also still works with the claude_config.json filled with MCP servers.
What Should Happen?
I expect claude code to open.
Error Messages/Logs
/Users/USER/.claude/local/claude: line 2: /Users/USER/.claude/local/node_modules/.bin/claude: No such file or directory
/Users/USER/.claude/local/claude: line 2: exec: /Users/USER/.claude/local/node_modules/.bin/claude: cannot execute: No such file or directory
Steps to Reproduce
Not entirely sure how to recreate, other than removing the file at .bin/claude and then running claude code.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
N/A (cannot run claude --version, however, installed the most recent version as of 11-09-2025)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
5 Comments
---
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
---
Hey, looks like your local installation ended up in a bad state. I would recommend doing
npx @anthropic-ai/claude-code /migrate-installerto get back to your previous state.the same
@ant-kurt This worked.
I did first have to remove the `.claude/local/ folder. Before that I was unable to successfully run the above command. If you decide to remove that folder, double check you are not deleting anything you do not want to delete.
So for me to solve this issue:
~/.claude/local/npx @anthropic-ai/claude-code /migrate-installeras suggested by @ant-kurtThis issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.