[BUG] ReferenceError: ReadableStream is not defined
Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Jun 24, 2025 · closed Jan 7, 2026
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: Claude Code
- Claude CLI version: latest as of 2025.06.24
- Operating System: macOS 15.5 (arm64)
- Terminal: iTerm2 3.5.14 with Oh My Zsh
Bug Description
Running Claude Code fails with an error.
Steps to Reproduce
- From iTerm2
- run
npm install -g @anthropic-ai/claude-code - run
claude
Expected Behavior
Claude should launch
Actual Behavior
up to date in 400ms
24 packages are looking for funding
run `npm fund` for details
file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:319
<<file_contents_removed>>
ReferenceError: ReadableStream is not defined
at file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:319:18633
at file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:7:402
at file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:319:32045
at file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:7:402
at file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:320:6062
at file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:7:402
at file:///Users/FOO/.volta/tools/image/packages/@anthropic-ai/claude-code/lib/node_modules/@anthropic-ai/claude-code/cli.js:716:1151
Additional Context
$ node -v
v22.2.0
$ npm -v
10.7.0
$ nvm -v
0.39.7
11 Comments
I had this issue and fixed it by switching to node 18 - you're likely using an outdated version of node.
I'm experiencing this issue on Node
22.14.0, so I don't think it's related to the Node version.similar issue but ran
npm install -g @anthropic-ai/claude-codeagain and no longer see this error.My issue was that even though
node -vreported an acceptable version, volta defaulted to a much older version when installing claude code. I updated my default system node for volta and it worked thereafter.i run into the same issue with node 22.5.1
i run into the same issue with bun v1.2.2
I was facing the same issue with Node version 16. I upgraded to Node 20, re-ran
npm install -g @anthropic-ai/claude-code, and it fixed the issue.Finally, I found the solution about "ReferenceError: ReadableStream is not defined".
Checking your file system. find out whether there are 2 different nodejs version. Sometimes it use old version(under 18) to install and run the claude code.
find old version, delete it.
or find out all the nodejs version, delete all of them.
install the lastest stable version of nodejs, it will work.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.