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

eslint-plugin-import does not support eslint 8 yet #2252

Closed
miladezzat opened this issue Oct 11, 2021 · 17 comments
Closed

eslint-plugin-import does not support eslint 8 yet #2252

miladezzat opened this issue Oct 11, 2021 · 17 comments

Comments

@miladezzat
Copy link

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)
@ljharb
Copy link
Member

ljharb commented Oct 11, 2021

This plugin is not yet compatible with eslint 8. npm 8 should have warned you when installing it.

Duplicate of #2251. Duplicate of #2211.

@ljharb ljharb closed this as completed Oct 11, 2021
@ljharb ljharb changed the title Breaking changing in Esling eslint-plugin-import does not support eslint 8 yet Oct 11, 2021
@lucaoskaique
Copy link

got the same problem here with eslint-plugin-import

@lucaoskaique
Copy link

I used yarn to install it, should have it also warned when installed it ?!

@ljharb
Copy link
Member

ljharb commented Oct 20, 2021

Yes, it should have.

Either way, eslint-plugin-import supports eslint 8 now, so you shouldn’t have any issues.

@ljharb ljharb reopened this Oct 20, 2021
@ljharb ljharb closed this as completed Oct 20, 2021
@tpmai22
Copy link

tpmai22 commented Oct 21, 2021

@ljharb Hi sir, I just try to upgrade our team project to use npm install eslint@8.0.0 and still bump into the same problem? Could you mind to show me how to fix it ?

@ljharb
Copy link
Member

ljharb commented Oct 21, 2021

@BeAmazedVariable first update eslint-plugin-import, and try again.

@tpmai22
Copy link

tpmai22 commented Oct 21, 2021

@ljharb I just try and it did work out. Thank you so much for your instruction

@julianoventola
Copy link

During install process it still recommend using eslint-plugin-import@^2.22.1, only in 2.22.2 it was fixed. 😓

@ljharb
Copy link
Member

ljharb commented Oct 23, 2021

@julianoventola during what install process?

@julianoventola
Copy link

@julianoventola during what install process?

Sorry...During eslint install process, at the end, it still recommends using version 2.22.1
image

@ljharb
Copy link
Member

ljharb commented Oct 25, 2021

@julianoventola no, it's using ^2.22.1 - the ^ means "latest non-breaking", so by default it will indeed install the latest version.

@julianoventola
Copy link

@julianoventola no, it's using ^2.22.1 - the ^ means "latest non-breaking", so by default it will indeed install the latest version.

Yes, but, using this way, it does not work, eslint will break, i had to force 2.22.2. Thank you for the attention anyway

@ljharb
Copy link
Member

ljharb commented Oct 25, 2021

That doesn't make sense, unless you have a lockfile that already has v2.22.1 in it.

@morijenab

This comment has been minimized.

@ljharb

This comment has been minimized.

@JannikZed
Copy link

we are facing the same issue - using eslint-plugin-import@2.24.2 and eslint 8.15.0 .. could somebody explain this issue to us better and re-open this issue?

@ljharb
Copy link
Member

ljharb commented May 11, 2022

@JannikZed the issue is you’re using an outdated version of the plugin. Update it to the latest. There’s nothing left to fix, and no need to reopen.

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

No branches or pull requests

7 participants