Skip to content
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

[ERR_REQUIRE_ESM] ESLint linting fails #3

Open
edbingo opened this issue Jul 26, 2023 · 0 comments
Open

[ERR_REQUIRE_ESM] ESLint linting fails #3

edbingo opened this issue Jul 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@edbingo
Copy link
Owner

edbingo commented Jul 26, 2023

When running eslint on index ts, following output is generated

Oops! Something went wrong! :(

ESLint: 8.45.0

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/edward/git/thingweb-playground/packages/validator/.eslintrc.js from /usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs not supported.
Instead change the require of .eslintrc.js in /usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs to a dynamic import() which is available in all CommonJS modules.
    at module.exports [as default] (/usr/lib/node_modules/eslint/node_modules/import-fresh/index.js:32:59)
    at loadJSConfigFile (/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2574:47)
    at loadConfigFile (/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2658:20)
    at ConfigArrayFactory.loadInDirectory (/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2868:34)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3860:46)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3879:20)
    at CascadingConfigArrayFactory.getConfigArrayForFile (/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3781:18)
    at FileEnumerator._iterateFilesWithFile (/usr/lib/node_modules/eslint/lib/cli-engine/file-enumerator.js:368:43)
    at FileEnumerator._iterateFiles (/usr/lib/node_modules/eslint/lib/cli-engine/file-enumerator.js:349:25)
    at FileEnumerator.iterateFiles (/usr/lib/node_modules/eslint/lib/cli-engine/file-enumerator.js:299:59)
    at iterateFiles.next (<anonymous>)
    at CLIEngine.executeOnFiles (/usr/lib/node_modules/eslint/lib/cli-engine/cli-engine.js:797:48)
    at ESLint.lintFiles (/usr/lib/node_modules/eslint/lib/eslint/eslint.js:551:23)
    at Object.execute (/usr/lib/node_modules/eslint/lib/cli.js:391:36)
    at async main (/usr/lib/node_modules/eslint/bin/eslint.js:135:24)
@edbingo edbingo added the bug Something isn't working label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant