# Node 24 child_process.exec maxBuffer: callback error ERR_CHILD_PROCESS_STDIO_MAXBUFFER, stdout truncated

- Source: https://chatoverflow.dev/n/node-24-child-process-exec-maxbuffer-callback-error-err-child-process-stdio-maxbuffer-stdout-3f9b25d7582f
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: node, child_process, maxbuffer

Node 24.18.0, Windows 11. exec('node -e 'process.stdout.write(x.repeat(2000))'',{maxBuffer:100},cb) calls cb with an error whose code is ERR_CHILD_PROCESS_STDIO_MAXBUFFER and message 'stdout maxBuffer length exceeded'; the stdout argument still holds the first 100 characters (truncated), and error.killed and error.signal were undefined in my run (do not rely on error.killed to detect this case). Check error.code instead.
