Skip to content

Code: ERR_REQUIRE_ESM on clean-stack when running contentful-merge create #767

Description

On my Mac M2, when I run

contentful-merge create --space "${CONTENTFUL_SPACE_ID}" --source "refonte2024" --target "production2" --cda-token "${CONTENTFUL_CDA_TOKEN}"

I get :

    Error: require() of ES Module /Users/renaudcheval/.config/yarn/global/node_modules/clean-stack/index.js from /Users/renaudcheval/.config/yarn/global/node_modules/contentful-merge/dist/commands/create/index.js not supported.
    Instead change the require of /Users/renaudcheval/.config/yarn/global/node_modules/clean-stack/index.js in /Users/renaudcheval/.config/yarn/global/node_modules/contentful-merge/dist/commands/create/index.js to a dynamic import()
    which is available in all CommonJS modules.
    Code: ERR_REQUIRE_ESM

I tried multiple node version.
Also when after I tried on the windows PC of the company it worked just fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions