Skip to content

RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded #205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
grzegorzkrukowski opened this issue Apr 29, 2024 · 1 comment

Comments

@grzegorzkrukowski
Copy link

Steps To Reproduce The Error

  • checkout the PR 12047 from the publicly available repository https://github.com/raycast/extensions/pull/12047/files
  • run imageoptim * to optimize all images in extensions/hyrule-compendium-search/assets/materialIcons - 85 images with few KB only
  • check the error appering

Expected Behaviour

Images should be optimised without an error

Actual Behaviour

Error is thrown

! stderr maxBuffer length exceeded

! Please raise an issue at https://github.com/JamieMason/ImageOptim-CLI/issues

    RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
        at new NodeError (node:internal/errors:388:5)
        at Socket.onChildStderr (node:child_process:476:14)
        at Socket.emit (node:events:537:28)
        at addChunk (node:internal/streams/readable:324:12)
        at readableAddChunk (node:internal/streams/readable:293:11)
        at Readable.push (node:internal/streams/readable:234:10)
        at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

Version Numbers or N/A

  • macOS: 14.1
  • /Applications/ImageOptim.app: 1.9.3
@troyxmccall
Copy link

@grzegorzkrukowski I've addressed this issue in this PR

#200

until it is merged, you can

git clone https://github.com/troyxmccall/ImageOptim-CLI -b  batch-size-option
cd ImageOptim-CLI
yarn && yarn build

to build the binary with batch-size options

then, in that same ImageOptim-CLI dir you can run

./dist/imageoptim --batch-size=5 /full/path/to/your/folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants