Skip to content
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

jsdoc-to-markdown fails with ENOBUFS error when renderSync #21

Closed
L2jLiga opened this issue May 31, 2020 · 3 comments · Fixed by postmanlabs/postman-runtime#1060 · 4 remaining pull requests
Closed

jsdoc-to-markdown fails with ENOBUFS error when renderSync #21

L2jLiga opened this issue May 31, 2020 · 3 comments · Fixed by postmanlabs/postman-runtime#1060 · 4 remaining pull requests

Comments

@L2jLiga
Copy link

L2jLiga commented May 31, 2020

JSDoc-api fails with output parse error cause stdout is out of buffer and result is not full (spawnSync process is killed by SIGTERM)

Expected behavior

jsdoc-to-markdown generate docs w/o errors, it can be aimed by increasing maxBuffer option in jsdoc spawnSync call

Current behavior

crash

Your environment

Software Version
JSDoc master
Node.js 12.16
npm 6.14
Operating system Windows / Ubuntu / Fedora
@75lb 75lb closed this as completed in 0919d54 May 31, 2020
75lb added a commit to jsdoc2md/jsdoc-to-markdown that referenced this issue May 31, 2020
@75lb
Copy link
Member

75lb commented May 31, 2020

Fixed in new versions of jsdoc-api and jsdoc2md.. Please upgrade.

@L2jLiga
Copy link
Author

L2jLiga commented Jun 1, 2020

Thanks!

@csempesz
Copy link

csempesz commented Feb 1, 2021

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 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment