TypeError: OASNormalize is not a constructor
Khauri opened this issue · comments
Generating my api spec returns this error:
/home/runner/.npm/_npx/e173f61e566da0ba/node_modules/oas/src/cli/lib/utils.js:63
let oas = new OASNormalize(generatedDefinition);
^
TypeError: OASNormalize is not a constructor
at Object.exports.findSwagger
Version: 18.4.2
Possibly due to this typescript rewrite of oas-normalize which could have caused OASNormalize to be exported under the key default
, whereas the line where the error is coming from is not importing that default.
Workaround: For me I simply downgraded to version 18.3.3.
Ah crap, yeah that's what happened. We don't have any test coverage on the CLI part of this library so I didn't catch it. Will fix this shortly and tag a new release.
This is resolved in v18.4.3. Apologies!