ImageOptim-CLI
ImageOptim-CLI copied to clipboard
RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
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 inextensions/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
@grzegorzkrukowski I've addressed this issue in this PR
https://github.com/JamieMason/ImageOptim-CLI/pull/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