-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
[openapi-metadata] Support for CommonJS #2097
Comments
Thanks guys! I have seen that this is already included in 0.2.0. We have added a task for testing it in Feb. I will report the results here. We are in a MVP testing |
@kerwanp trying to use openapi-metadata importing it with CommonJS we get the error:
|
@acs could you show me your // Not good
const { ApiOperation } = require('openapi-metadata/dist/decorators')
// Good
const { ApiOperation } = require('openapi-metadata/decorators') |
@kerwanp I am sorry about the delay. let me recheck how we are importing ApiOperation.
Ups, pretty strange we do it that way! Maybe the IDE (WebStorm) suggested that for some reason. Yes, it is Webstorm which suggests importing it that way in our Typescript code. If I try to import the library as:
the module can not be found. The error message is:
The version installed is:
|
Description
Hi team!
We are trying to use
openapi-metadata
in a large TypeScript project which is based onCommonJS
(we plan to migrate to ESM at some point but not yet). It seems thatopenapi-metadata
does not supportCommonJS
(the TS compiler suggest to change 'moduleResolution' setting 'node16', 'nodenext', or 'bundler'.).Do you plan to support
CommonJS
inopenapi-metadata
?Than you for your effort and time in this great project
-- Alvaro
Proposal
Support
CommonJS
inopenapi-metadata
Extra
The text was updated successfully, but these errors were encountered: