[BUG] Claude code CLI no longer works, crashes on startup
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [X] Other: MacOS
- Claude CLI version: latest, but can't run claude to find out
- Operating System: MacOS 15.3
- Terminal: Terminal App
Bug Description
Something I added or changed caused claude code to stop working but not sure what. To fix it, I uninstalled claude code and reinstalled with bun install --global claude but I still get errors on startup.
Steps to Reproduce
-
bun install --global claude
% ~/.bun/bin/claude
file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:277
... lots of code dump...
TypeError: Cannot read properties of undefined (reading 'prototype')
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:277:25482
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:13:402
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:277:25601
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:13:402
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:279:3206
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:13:402
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:279:6228
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:13:402
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:279:7433
at file:///Users/garyo/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:13:402
Node.js v24.0.0
%
Expected Behavior
Expect it to give me a prompt and work normally
Actual Behavior
Crashes with above error.
Additional Context
I tried removing my claude config (incl ~/Library/Application Support/claude) and uninstalling everything I could find claude-related, but no joy.
It might be related to the fact that I tried aider -- I'm not sure how to remove that. I installed it via uvx aider-install, but it seems to be all python so perhaps that's unrelated.
Hi! Does it work if you install using NodeJS, rather than Bun? npm i -g @anthropic-ai/claude-code.
No, same symptom, sorry.
Hi @garyo, there is a known issue with Node 24.0.0. Upgrading to 24.0.1 or later should resolve this.
See https://github.com/anthropics/claude-code/issues/1291.
Confirmed, works fine with node 24.1.0. Thanks!
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.