Skip to content

Not working with ESM #110

Open
Open
@Vaibhavriju

Description

@Vaibhavriju

I use ESM rather than CSJ. I get an error saying, "

{"errorMessage":"exports is not defined in ES module scope\nThis file is being treated as an ES module because it has a '.js' file extension and 'C:\Users\vaibh\slsapis\iot\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.","errorType":"ReferenceError","stackTrace":["ReferenceError: exports is not defined in ES module scope","This file is being treated as an ES module because it has a '.js' file extension and 'C:\Users\vaibh\slsapis\iot\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.","at file:///C:/Users/vaibh/slsapis/iot/swagger/swagger-html.js:2:1"]}

"

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