ngx-deploy-npm: [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
Hi there, I have a Stenciljs web component library set up on my Nx monorepo, and whenever I try to deploy (publish) the library I get the following error:
If I manually run npm publish over the library build, it works as expected. Any idea what can be the reason for ngx-deploy-npm
failing?
I want to mention that it runs ok in another library under the same monorepo (a react wrapper library for the web component library discussed before).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (9 by maintainers)
Commits related to this issue
- fix: increment exec buffer size to allow package publishment with a large set of files Increment temporary the exec buffer size to prevent errors when executing npm plubish for packages with a great ... — committed to bikecoders/ngx-deploy-npm by dianjuar 2 years ago
- fix: increment exec buffer size to allow package publishment with a large set of files Increment temporary the exec buffer size to prevent errors when executing npm publish for packages with many fil... — committed to bikecoders/ngx-deploy-npm by dianjuar 2 years ago
- fix: increment exec buffer size to allow package publishment with a large set of files Increment temporary the exec buffer size to prevent errors when executing npm publish for packages with many fil... — committed to bikecoders/ngx-deploy-npm by dianjuar 2 years ago
- fix: increment exec buffer size to allow package publishment with a large set of files Increment temporary the exec buffer size to prevent errors when executing npm publish for packages with many fil... — committed to bikecoders/ngx-deploy-npm by dianjuar 2 years ago
- fix: increment exec buffer size to allow package publishment with a large set of files (#403) Increment temporary the exec buffer size to prevent errors when executing npm publish for packages with ... — committed to bikecoders/ngx-deploy-npm by dianjuar 2 years ago
- fix: allow publishment of libraries with a large set of files (#416) close #401 — committed to bikecoders/ngx-deploy-npm by dianjuar 2 years ago
@dgonzalezr using V4.3.2, you will be able to publish your package.
Let’s leave this issue open while I work on a more permanent fix. Please leave your public repo alive so I can have a real-world scenario for testing
@dgonzalezr an idea that I have, as hot fix. I can increase the buffer to its maximum to see if that’s enough to allow you publish.
I can do that very quickly, so you’ll be able to move forward. In the meantime, I’ll be working on the fix described above.
It works for you?
I found the problem.
npm publish
creates a list of all the files in your bundle. The number of files in your bundle is large. So large that my terminal couldn’t print it all, I couldn’t scroll across the output because it got cut.We execute the
npm publish
command usingchild_process.exec
and a particularity thatchild_process.exec
has is when the size of the stdout is bigger than the default amount of buffer it produces an error.That’s why you are able to execute the command without problems, but
ngx-deploy-npm
don’t.See node
child_process.exec
documentationThe solution seems to be using
child_process.spawn
instead. They have events instead of a buffer to expose the stdout.I would work on the fix.
I have access now.
I took a look, and everything seems to be in order. I’m going to debug the publish-beta operation on your code base to see step by step to watch more in-depth what could be the reason.
I’ll try to do that today at night.