[BUG] Will not run on Node version 24

Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 3 comments · opened May 24, 2025 · closed May 28, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [ x ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other:
  • Claude CLI version: errors
  • Operating System: mac osx 15.4.1
  • Terminal: iTerm2

Bug Description

claude command errors when using Node 24

➜  ~ node -v
v23.11.0
➜  ~ claude -v
1.0.3 (Claude Code)
➜  ~ fnm use 24
➜  ~ node -v
v24.0.0
➜  ~ claude -v
file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:322
`),Q.code=I.error.code,Q.errors=I.error.
... TRUNCATED ...
().Buffer,Pz=D1("crypto"),gO0=Rg1(),bO0=D1("util"),l06=`"%s" is not a valid algorithm.


TypeError: Cannot read properties of undefined (reading 'prototype')
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:322:25482
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:13:402
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:322:25601
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:13:402
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:324:3206
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:13:402
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:324:6228
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:13:402
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:324:7433
    at file:///Users/user/Library/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.3/node_modules/@anthropic-ai/claude-code/cli.js:13:402

Node.js v24.0.0

View original on GitHub ↗

3 Comments

ant-kurt collaborator · 1 year ago

I'm able to run Claude Code on 24.0.1 and later.

I believe this is related to the SlowBuffer EOL introduced in 24.0.0, which was reverted in 24.0.1 (https://nodejs.org/en/blog/release/v24.0.1#notable-changes). Please comment if you're still running into this issue after upgrading.

m3hari · 1 year ago

That was it updating to node 24.0.1, resolve for me

github-actions[bot] · 1 year 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.