Skip to content

Incompatibility with ES Modules (type: "module") [Node 20+] #4

@francescobianco

Description

@francescobianco

Using import Openapi from 'openapi-sdk' in an ESM project triggers a SyntaxError: Cannot use import statement outside a module.
Context: Node 20+, "type": "module" set in package.json.
Workaround: Use require('openapi-sdk').default, but this breaks linting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions