Skip to content

[BUG] ERR_CHILD_PROCESS_STDIO_MAXBUFFER when trying to get the JSON diff of a large document #1167

Open
@keneanung

Description

Describe the bug
I am trying to get the changes in a large (~26MB) JSON document. However, when trying to get a diff of the file I get the following error:

RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded
    at Socket.onChildStdout (child_process.js:368:14)
    at Socket.emit (events.js:314:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:268:11)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23) {
  code: 'ERR_CHILD_PROCESS_STDIO_MAXBUFFER',
  cmd: 'git show gh-pages:"Map/map.json"'
}

To Reproduce
Steps to reproduce the behavior:

  1. Check out https://github.com/IRE-Mudlet-Mapping/AchaeaCrowdmap
  2. Make a JSON change in Map/map.json
  3. add a dangerfile with the following content: danger.git.JSONDiffForFile("Map/map.json").then(diff => console.log(diff));
  4. stage the change in Map/map.json
  5. run yarn danger local --base gh-pages -s

Expected behavior

No exception.

Your Environment

software version
danger.js 10.7.0
node v12.21.0
npm 8.0.0
yarn 1.22.15
Operating System Ubuntu 21.04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    You Can Do ThisThis idea is well spec'd and ready for a PRbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions