kogosoftwarellc / open-api

A Monorepo of various packages to power OpenAPI in node
MIT License
892 stars 235 forks source link

Cannot use express-openapi in ES Modules modus #692

Closed w3nl closed 5 months ago

w3nl commented 3 years ago

If you use the package express-openapi in ES Modules (with import/export and "type": "module" in your package.json). You get an error that you cannot use require, it is in the openapi-framework package. I think this should be the fix. See: https://nodejs.org/api/esm.html#esm_commonjs_json_and_native_modules