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
eslint-plugin-import error After Upgrade Eslint 8.0.0 #15148
Comments
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. |
We encounter the same issue with @cucumber/cucumber-expressions: cucumber/cucumber-expressions#29 @ljharb what do you mean? I cannot find any warning in the GHA logs. I have tried myself to install eslint using npm 7 and 8 and showed no warning of any kind. $ npm --version
8.0.0
$ npm i -D eslint
added 77 packages, and audited 172 packages in 1s
17 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities |
This occurred with airbnb "eslint": "^8.0.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.24.2", |
@aurelien-reeves mybe npm has a bug. Run ‘eslint-plugin-import`, as well as the Airbnb config, do not yet support eslint 8. You must stay on eslint 7 for the time being. |
I'm getting the same error message as the OP and a bunch of warnings after upgrading to eslint 8.
I guess I need to wait for all these packages to support eslint 8 before I can upgrade. |
Yep, every time anything that has a plugin system bumps a major (eslint, babel, typescript, react, etc), you always have to wait until the plugin ecosystem catches up. That's just part of the tradeoffs that must be made when one combines "a plugin system" with "breaking changes". |
What @ljharb said. :) We will leave this open for visibility but there is nothing for the ESLint team to do here. |
I've just released v2.25.1 of |
Solved |
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
What parser are you using?
Default (Espree)
What did you do?
Configuration
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. (/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
Additional comments
No response
The text was updated successfully, but these errors were encountered: