eslint-plugin-import error After Upgrade Eslint 8.0.0
See original GitHub issueEnvironment
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:
- Created 2 years ago
- Reactions:39
- Comments:9 (5 by maintainers)
Top GitHub Comments
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.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.