Unhandled EPIPE Error in Node.js Socket Write Operation

Resolved 💬 1 comment Opened Jul 1, 2025 by naveensoman Closed Jul 1, 2025

Bug Description

node:events:496
throw er; // Unhandled 'error' event
^

Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}

Node.js v22.16.0

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.38
  • Feedback ID: 5e867a61-68fb-443a-9e74-02b413316fc2

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at WI (file:///Users/naveen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:701:3921)\n    at file:///Users/naveen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:9038\n    at Q (file:///Users/naveen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:13327)\n    at SX (file:///Users/naveen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:8184)\n    at K_ (file:///Users/naveen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:7265)\n    at O9 (file:///Users/naveen/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:623:11432)","timestamp":"2025-07-01T10:45:29.817Z"},{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:481:14)\n    at Socket.emit (node:events:518:28)\n    at Socket.emit (node:domain:489:12)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-07-01T10:45:30.239Z"}]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗