claude-code - 💡(How to fix) Fix [Bug] Unable to update Claude Code CLI

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

[{"error":"UpH: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/logs/2026-05-28T18_19_06_771Z-debug-0.log\n at FO (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8885:2270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:19:06.932Z"},{"error":"UpH: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/logs/2026-05-28T18_19_13_110Z-debug-0.log\n at FO (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8885:2270)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:19:13.267Z"},{"error":"UpH: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/logs/2026-05-28T18_20_20_850Z-debug-0.log\n at FO (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:20:21.008Z"}]

Code Example

[{"error":"UpH: Failed to install new version of claude:  npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/_logs/2026-05-28T18_19_06_771Z-debug-0.log\n    at FO_ (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8885:2270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:19:06.932Z"},{"error":"UpH: Failed to install new version of claude:  npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/_logs/2026-05-28T18_19_13_110Z-debug-0.log\n    at FO_ (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8885:2270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:19:13.267Z"},{"error":"UpH: Failed to install new version of claude:  npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/_logs/2026-05-28T18_20_20_850Z-debug-0.log\n    at FO_ (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:20:21.008Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description cant update claude code

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.119
  • Feedback ID: 3cfe0206-249c-4479-91fb-11434bce5727

Errors

[{"error":"UpH: Failed to install new version of claude:  npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/_logs/2026-05-28T18_19_06_771Z-debug-0.log\n    at FO_ (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8885:2270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:19:06.932Z"},{"error":"UpH: Failed to install new version of claude:  npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/_logs/2026-05-28T18_19_13_110Z-debug-0.log\n    at FO_ (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8885:2270)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:19:13.267Z"},{"error":"UpH: Failed to install new version of claude:  npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code' -> '/opt/homebrew/lib/node_modules/@anthropic-ai/.claude-code-2DTsDk1V'\nnpm error A complete log of this run can be found in: /Users/vijayrajhonnur/.npm/_logs/2026-05-28T18_20_20_850Z-debug-0.log\n    at FO_ (/$bunfs/root/src/entrypoints/cli.js:2733:2203)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-28T18:20:21.008Z"}]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING