Skip to content

Unable to use contentful-export as an ESM Module #1958

@aaron5670

Description

@aaron5670

I am attempting to use the contentful-export library in an ESM environment. While the library functions correctly when imported using CommonJS syntax, it fails to work when imported as an ES module.

Working Example (CommonJS):

const contentfulExport = require('contentful-export');

Failing Example (ESM):

import contentfulExport from 'contentful-export';

Expected Behavior:

  • The library should support ESM imports seamlessly, allowing usage in modern JavaScript projects configured for ES modules.

Actual Behavior:

  • When attempting to use the ESM syntax, the library does not function as expected.

Additional Context:

  • Node.js Version: v22.13.0
  • contentful-export Version: 7.21.14

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