You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Package type: module (native node ESM ending in .js)
Bug
importOpenAPIResponseValidatorfrom'openapi-response-validator'constvalidator=newOpenAPIResponseValidator({responses: {},components: {}})// throws "OpenAPIResponseValidator is not a constructor"// because OpenAPIResponseValidator === { __esModule: true, default: function OpenAPIResponseValidator () {}}
Temp fixes
(clunky, TS types intellisense no longer working in VS Code)
Provide different entrypoints in dist and expose them to the relevant environments using package.jsonmain, module and exports fields. Alternatively, manually wrap output in a UMD wrapper
The text was updated successfully, but these errors were encountered:
same issue with import OpenAPISchemaValidator from 'openapi-schema-validator', workarounds not working. Property 'default' does not exist on type 'typeof OpenAPISchemaValidator'
Context
.js
)Bug
Temp fixes
(clunky, TS types intellisense no longer working in VS Code)
or (in generated code, not clean but working)
Replace following statements
with
Solution
Provide different entrypoints in
dist
and expose them to the relevant environments usingpackage.json
main
,module
andexports
fields. Alternatively, manually wrap output in a UMD wrapperThe text was updated successfully, but these errors were encountered: