jsdoc-api icon indicating copy to clipboard operation
jsdoc-api copied to clipboard

jsdoc-to-markdown fails with ENOBUFS

Open csempesz opened this issue 4 years ago • 1 comments

This is the same issue as reported in https://github.com/jsdoc2md/jsdoc-api/issues/21 I'm running into this issue even after I have upgraded to 6.0.1. I'm using Node v14.15.4 on Windows 10. Not sure about other projects but our src is somewhat large. I can see when I debug the spawned jsdoc process, that jsdoc is trying to deal with roughly 85K doclets. I can also see when watching the Memory heap size in Chrome DevTools that the memory size for the spawned process goes up to 850MByte so the default maxBuffer setting for the spawned process (20M) is not nearly enough. If I mess around with jsdoc-api/lib/explain-sync and update the maxBuffer to 1G (maxBuffer: 1024 * 1024 * 1024) then my process finishes as expected. Not sure what to do at this point. Up until now, we used jsdoc 3.4 with Node version < 12. But we had to upgrade Node to LTS version however the upgrade also forced us to upgrade jsdoc to 3.6. Now our process to generate JSON from doclets is broken. Does it make sense to allow setting the maxBuffer size as an env variable?

csempesz avatar Feb 01 '21 21:02 csempesz