claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] RangeError: Invalid string length

Open claude-ai-netra opened this issue 1 year ago • 3 comments

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?

RangeError: Invalid string length
    at Socket.<anonymous> (file:///C:/Users/USER/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:825:2870)
    at Socket.emit (node:events:520:35)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

Node.js v24.8.0 

What Should Happen?

work

Error Messages/Logs

RangeError: Invalid string length
    at Socket.<anonymous> (file:///C:/Users/USER/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:825:2870)
    at Socket.emit (node:events:520:35)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

Node.js v24.8.0

Steps to Reproduce

file:///C:/Users/USER/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:825
`);if(G!==-1){if(ZQ="",B}}}function hU1(A,B,Q,Z){let G="running",Y,I=lUA(A.stdout),W=lUA(A.stderr);if(Z){let K=new i41(1000),H=0,z=(D)=>{let E=D.toString().split(`

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.0.111 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

claude-ai-netra avatar Sep 11 '25 18:09 claude-ai-netra

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/6538
  2. https://github.com/anthropics/claude-code/issues/962
  3. https://github.com/anthropics/claude-code/issues/3047

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Sep 11 '25 18:09 github-actions[bot]

This issue has been automatically closed as a duplicate of #6538.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Sep 15 '25 09:09 github-actions[bot]

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.

github-actions[bot] avatar Sep 22 '25 14:09 github-actions[bot]