[BUG] claude and claude --version CLI commands are failing

Resolved 💬 2 comments Opened Oct 19, 2025 by prezadito Closed Oct 19, 2025

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 claude or claude --version in the iTerm2 shell, I get an error (attached below)

What Should Happen?

I should be asked to authenticate

Error Messages/Logs

... lots of code dump...

TypeError: Cannot read properties of undefined (reading 'prototype')
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:635:25327
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:402
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:635:25447
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:402
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:637:3204
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:402
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:637:6226
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:402
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:637:7408
    at file:///Users/adityaniloi/.nvm/versions/node/v25.0.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:8:402

Node.js v25.0.0

Steps to Reproduce

Download and install nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

in lieu of restarting the shell

\. "$HOME/.nvm/nvm.sh"

Download and install Node.js:

nvm install 25

Verify the Node.js version:

node -v # Should print "v25.0.0".

Verify npm version:

npm -v # Should print "11.6.2".

install Claude Code:

npm install -g @anthropic-ai/claude-code # should be successful

verify Claude version:

claude --version # should ask for authentication type since its first time running

Claude Model

None

Is this a regression?

I don't know

Last Working Version

N/A

Claude Code Version

N/A

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

node -v
v25.0.0
npm -v
11.6.2

reference to previously reported bug - closed

View original on GitHub ↗

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