[BUG] can't be reinstalled

Status Closed — not planned
Maintainer reply None cached
Activity 7 comments · opened Oct 11, 2025 · closed Jan 7, 2026

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?

zsh: no such file or directory: /home/withinboredom/.claude/local/claude

This is after rm -rf ~/.claude && npm rm -g @anthropic-ai/claude-code.

Then I run npm install -g @anthropic-ai/claude-code.

What Should Happen?

Removing the claude package should remove the alias tucked away in my zshrc file.

Error Messages/Logs

Steps to Reproduce

Provided above.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.14 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

7 Comments

github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9117
  2. https://github.com/anthropics/claude-code/issues/6627
  3. https://github.com/anthropics/claude-code/issues/2824

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

snaka · 1 year ago

I have a same issue.

The situation where I noticed this issue was slightly different.

When I tried to call the claude command normally, I encountered the following error:

$ claude
/Users/snaka/.claude/local/claude: line 2: /Users/snaka/.claude/local/node_modules/.bin/claude: No such file or directory
/Users/snaka/.claude/local/claude: line 2: exec: /Users/snaka/.claude/local/node_modules/.bin/claude: cannot execute: No such file or directory

Therefore, after deleting the application and then reinstalling it, the same situation as in the initial report occurred.

<details><summary>Investigation logs</summary>
<p>

Review contents of the script.

$ cat ~/.claude/local/claude
#!/bin/bash
exec "/Users/snaka/.claude/local/node_modules/.bin/claude" "$@"

I tried the claude script file.

$ ls -la ~/.claude/local/node_modules/
total 8
drwxr-xr-x@ 6 snaka  staff   192 Jul 12 10:54 .
drwxr-xr-x@ 6 snaka  staff   192 Jul 12 10:54 ..
drwxr-xr-x@ 2 snaka  staff    64 Oct 12 04:14 .bin
-rw-r--r--@ 1 snaka  staff  2097 Oct  7 06:00 .package-lock.json
drwxr-xr-x@ 4 snaka  staff   128 Oct  7 06:59 @anthropic-ai
drwxr-xr-x@ 4 snaka  staff   128 Oct 12 04:14 @img

List contents of the .bin directory.

$ ls -la ~/.claude/local/node_modules/.bin/
total 0
drwxr-xr-x@ 2 snaka  staff   64 Oct 12 04:14 .
drwxr-xr-x@ 6 snaka  staff  192 Jul 12 10:54 ..

There is no files... 🤔

So, I tried reinstall claude command and run...

$ npm install -g @anthropic-ai/claude-code

added 9 packages, and changed 3 packages in 5s

11 packages are looking for funding
  run `npm fund` for details
Reshimming asdf nodejs...

$ claude
-bash: /Users/snaka/.claude/local/claude: No such file or directory

</p>
</details>

---

Claude Code Version

2.0.14 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app

snaka · 1 year ago

While writing the above issue, the problem somehow resolved itself... I have no idea why it recovered... X(

github-actions[bot] · 10 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

withinboredom · 10 months ago

stalebot, you are dumb.

github-actions[bot] · 9 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 9 months ago

This 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.