Skip to content

ERR_REQUIRE_ESM in React Native project #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rozekfr opened this issue Apr 20, 2023 · 0 comments
Open

ERR_REQUIRE_ESM in React Native project #1

rozekfr opened this issue Apr 20, 2023 · 0 comments

Comments

@rozekfr
Copy link

rozekfr commented Apr 20, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant