ember-cli-update: ERR_CHILD_PROCESS_STDIO_MAXBUFFER

Got this when running ember-cli-update --to 3.10.1 in large monorepo.

{ RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded
    at Socket.onChildStdout (child_process.js:348:14)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:260:13)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:94:17)
  cmd: 'git ls-files',
  stdout: '-long-string-with-filenames-here-'

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 15 (3 by maintainers)

Most upvoted comments

@tfazekas I was just looking for this myself, maybe this helps: cd $(npm list -g | head -n1)/node_modules/ember-cli-update/node_modules/git-diff-apply

PS: setting a large maxBuffer size indeed fixed this issue for me as well.

@timiyay I think first step would be to get it to match the other spawn fix, then worry about configuring later. Thanks.

We’ve just encountered this error when also running in a large Ember monorepo.

@kellyselden WDYT about maxing the maxBuffer into a CLI param for ember-cli-update?

That would free us up to experiment with a maxBuffer size that suits our repo, while allowing you to maintain sensible defaults.

If that sounds agreeable, I can get a PR together.

I was able to fix it by changing this:

https://github.com/kellyselden/git-diff-apply/blob/47ff095ca65f81e7ceae698666a52908f79222a2/src/git-remove-all.js#L12

let files = (await run('git ls-files', Object.assign({ maxBuffer: 1024 * 500 }, options))).trim().split(/\r?\n/g);