question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eslint-plugin-import error After Upgrade Eslint 8.0.0

See original GitHub issue

Environment

Environment Info:

Node version: v14.17.6 npm version: v8.0.0 Local ESLint version: v8.0.0 (Currently used) Global ESLint version: v8.0.0 Operating System: linux 5.13.19-200.fc34.x86_64

Oops! Something went wrong! :(

ESLint: 8.0.0

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/util/glob-util' is not defined by "exports" in /home/milad/Desktop/sakneen/sakneen-api/node_modules/eslint/package.json
    at throwExportsNotFound (internal/modules/esm/resolve.js:299:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:522:3)
    at resolveExports (internal/modules/cjs/loader.js:449:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:489:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:875:27)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (/home/milad/Desktop/sakneen/sakneen-api/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/home/milad/Desktop/sakneen/sakneen-api/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js:43:34)
    at Module._compile (/home/milad/Desktop/sakneen/sakneen-api/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)

What parser are you using?

Default (Espree)

What did you do?

Configuration
<!-- Paste your configuration here -->
<!-- Paste your code here -->

What did you expect to happen?

no

What actually happened?

Oops! Something went wrong! 😦

ESLint: 8.0.0

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath ‘./lib/util/glob-util’ is not defined by “exports” in /home/milad/Desktop/sakneen/sakneen-api/node_modules/eslint/package.json at throwExportsNotFound (internal/modules/esm/resolve.js:299:9) at packageExportsResolve (internal/modules/esm/resolve.js:522:3) at resolveExports (internal/modules/cjs/loader.js:449:36) at Function.Module._findPath (internal/modules/cjs/loader.js:489:31) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:875:27) at Function.Module._load (internal/modules/cjs/loader.js:745:27) at Module.require (internal/modules/cjs/loader.js:961:19) at require (/home/milad/Desktop/sakneen/sakneen-api/node_modules/v8-compile-cache/v8-compile-cache.js:159:20) at Object.<anonymous> (/home/milad/Desktop/sakneen/sakneen-api/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js:43:34) at Module._compile (/home/milad/Desktop/sakneen/sakneen-api/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:39
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
ljharbcommented, Oct 12, 2021

I’ve just released v2.25.1 of eslint-plugin-import, which should resolve at least one of the issues. Please follow https://github.com/airbnb/javascript/issues/2478 for updates for the airbnb config, which encompasses a significant majority of the eslint ecosystem.

4reactions
ljharbcommented, Oct 10, 2021

If you’d used npm 7+ to install it, it would have warned you that eslint 8 and eslint-plugin-import aren’t compatible yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating to v8.0.0 - ESLint - Pluggable JavaScript Linter
To address: Make sure you upgrade to at least Node.js 12.22.0 when using ESLint v8.0.0. One important thing to double check is the...
Read more >
8.0.0 Failed to load plugin '@typescript-eslint' - Stack Overflow
I saw this error trying to use version 4.x.x of the @typescript-eslint packages:
Read more >
eslint-plugin-simple-import-sort - npm
Easy autofixable import sorting. ✅️ Runs via eslint --fix – no new tooling; ✅️ Also sorts exports where possible; ✅️ Handles ...
Read more >
eslint | Yarn - Package Manager
Make sure your plugins (and ESLint) are both in your project's package.json as devDependencies (or dependencies, if your project uses ESLint at runtime)....
Read more >
asd14/eslint-config - NPM Package Overview - Socket.dev
JavaScript ESLint bundle with best practices and common use rules for writing more consistent code. "semi": [ "error", "never" ] :godmode: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found