[BUG] Will not run on Node version 24

Resolved 💬 3 comments Opened May 24, 2025 by astanciu Closed May 28, 2025

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 ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗