claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] `claude update` fails with bun error from `watch`

Open samth opened this issue 3 weeks ago • 0 comments

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 I run any claude command, I get the following error.

EINVAL: invalid argument, watch '/home/samth/work/teaching/c211/.claude/settings.local.json'
     path: "/home/samth/work/teaching/c211/.claude/settings.local.json",
  syscall: "watch",
    errno: -22,
 filename: "/home/samth/work/teaching/c211/.claude/settings.local.json",
     code: "EINVAL"

      at new FSWatcher (node:fs:30:31)
      at watch (node:fs:300:10)
      at tMI (/$bunfs/root/claude:389:6265)
      at Tv0 (/$bunfs/root/claude:389:11478)
      at _watchWithNodeFs (/$bunfs/root/claude:389:6746)
      at _handleFile (/$bunfs/root/claude:389:7489)
      at _addToNodeFs (/$bunfs/root/claude:389:10516)

Bun v1.3.5 (Linux x64 baseline)

This initially happened when I tried to run claude update. However, claude help prints a similar error but then starts claude code normally.

What Should Happen?

Claude should start normally

Error Messages/Logs

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EINVAL: invalid argument, watch '/home/samth/work/teaching/c211/.claude/settings.local.json'
    at watch (unknown)
    at new FSWatcher (node:fs:30:31)
    at watch (node:fs:300:23)
    at tMI (/$bunfs/root/claude:389:6265)
    at Tv0 (/$bunfs/root/claude:389:11478)
    at _watchWithNodeFs (/$bunfs/root/claude:389:6746)
    at _handleFile (/$bunfs/root/claude:389:7489)
    at _addToNodeFs (/$bunfs/root/claude:389:10516)
    at processTicksAndRejections (native:7:39)

Steps to Reproduce

  1. claude update or claude or claude doctor.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.0.75

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Warp

Additional Information

No response

samth avatar Dec 22 '25 16:12 samth