Skip to content

ERR_REQUIRE_ESM in React Native project #1

@rozekfr

Description

@rozekfr

Hi, when I added this module to my React Native project, eslint reports the following error.

Error [ERR_REQUIRE_ESM]: require() of ES Module ${PROJECT_DIR}/node_modules/eslint-plugin-unused-i18next-locale-keys/node_modules/globby/index. js from ${PROJECT_DIR}/node_modules/eslint-plugin-unused-i18next-locale-keys/rules/no-unused-i18next-locale-keys.js not supported.
Instead change the require of index.js in ${PROJECT_DIR}/node_modules/eslint-plugin-unused-i18next-locale-keys/rules/no-unused-i18next-locale-keys.js to a dynamic import() which is available in all CommonJS modules.

Can you please advise me what to do?

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions