Closed Lomilar closed 4 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Just had this occur to me - swagger-jsdoc worked locally but then upon building with esbuild, the server crashes silently, took some time debugging only to find the same thing @Lomilar found.
Describe the bug Globbing a directory in the apis causes a crash in the swagger module.
To Reproduce
When the above code is used and comes across a node_modules that includes asn1.js (https://www.npmjs.com/package/asn1.js), a crash occurs.
To repro, create a directory called src/foo/asn1.js in the above path and run the above swagger method.
Expected behavior No crash, presumably through detecting whether something is not a directory before opening it.
Screenshots See error.
Desktop (please complete the following information): In node:20 docker container.
Additional context None.