You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
eslint-config-react-app is not compatible with ESLint 8 #11549
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rules/no-unused-expressions' is not defined by "exports" in /xxx/node_modules/eslint/package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
at resolveExports (internal/modules/cjs/loader.js:437:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:477:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (/xxx/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/xxx/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js:8:51)
at Module._compile (/xxx/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
Looks like eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js imports file that's not exported explicitly.
Reacted by Hanorine, Juergen Zimmermann, Žilvinas, Kirill Ezhemenskii, Stuart Casarotto, Navin Moorthy, Jan Aagaard, Adam Drago, Matt Jarrett, Peter Torsson and 29 more
Reacted by Nik Handyman, Afsaneh Fadaei, Marko Kosir, Roman Kornev, Lukas Elmer, Rubon72, Alvin Novian, Marija Trachtenberg, Radha Satam and Lauri Methuen
➜ yarn run eslint packages --ext .ts,.tsx --config .eslintrc
yarn run v1.22.10
$ /Users/oeduardoal/projects/gb/flora/node_modules/.bin/eslint packages --ext .ts,.tsx --config .eslintrc
Oops! Something went wrong! :(
ESLint: 8.0.1
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Failed to load plugin 'flowtype' declared in '--config » eslint-config-react-app': Package subpath './lib/rules/no-unused-expressions' is not defined by "exports" in /Users/oeduardoal/projects/gb/flora/node_modules/eslint/package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:413:9)
at packageExportsResolve (node:internal/modules/esm/resolve:652:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (/Users/oeduardoal/projects/gb/flora/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/Users/oeduardoal/projects/gb/flora/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js:8:51)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Why not back off eslint-config-react-app back to 7.x of eslint in the released version until 8.x is able to be integrated? It makes doing upgrades a bit of a mess. Just a suggestion.
Temporary workaround: npm i eslint-plugin-flowtype@latest eslint-plugin-import@latest eslint-plugin-react-hooks@next --force --save-dev
Reacted by Amrit Kahlon, Stathis Ntonas, pergunt, Chiamaka Nwolisa, Avasam, Samuel T., Juergen Zimmermann, Ramanpreet Singh, Roman Kornev, iaracb and 13 more
Reacted by Ananda Rizky Yuliansyah, Gokul Kulkarni, TOP TEQ, Fozoro, Will Breitkreutz, Vladlen Stankevich, Flashantik, Michaux Sean Kelley and ArtemFedorchuk
Reacted by Amrit Kahlon, Stathis Ntonas, pergunt, Avasam, Samuel T., Ramanpreet Singh, Gokul Kulkarni, ibrahim408, Ahmed Mansour and Michaux Sean Kelley
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
This fix is really needed now that react-scripts deprecated version 4.0.3 (to my knowledge there will not be a 4.0.4 patch release: we need a way to install 5.0.x). That version has a dependency on immer 8.0.1 with vulnerability CVE-2020-28477, node-forge 0.10.0 with vulnerability CVE-2022-0122, and others. If the issue is "fixed", I sure am having trouble following the thread above or coming up with a way to update my package.json. Here's what I just gave up trying:
Update eslint-config-react-app from 6.0.0 to 7.0.0
Update eslint from 7.32.0 to 8.9.0
Update react-scripts from 4.0.3 to 5.0.0
I tried some of the eslint-plugin-xxx items to devDependencies as well but always hit the error cited in the issue description.
The number of permutations I've tried with different versions is about 50, and it's just way too much of a headache iterating on a simple issue like dependency updates. How do we get attention paid to this nightmare we face as react developers?
Reacted by Axel P. Meier, Roman Kornev, John Ottenlips Franke, José Andrés Hernández Vargas, Kevin Chen, Jose Gallegos, mehas, cyper, Radha Satam, Andrea Tombarel and 9 more
Reacted by Andrés Correa Casablanca, Rich Braun, Phill Conrad, Denis Lutz, Lauri Methuen, Augustine Calvino, Daphne, Clément G, Paul Oloyede, Sebastian Schiller and 4 more
Nice. Figured I search for eslint before posting an issue to tell that eslint-config-react-app is not providing a new-config-file-format-compatible configuration for eslint. Found 197 open issues with 'eslint'. Half of them stale. At least 3 issues about the incompatibility, one of them also stale. React truly is the best framework in the world (I'm german and that was sarcasm)
Activity
hanorine commentedon Oct 14, 2021
It would be great to have this support in the upcoming v5.
oeduardoal commentedon Oct 14, 2021
Same behavior here!
Eslint 8.0.0
eslint-plugin-flowtype: 6.1.0
eslint-config-react-app: 6.0.0
tychenjiajun commentedon Oct 19, 2021
gajus/eslint-plugin-flowtype#496
jer-sen commentedon Oct 19, 2021
Here is a dirty fix that you can use with
patch-package:krishnaTORQUE commentedon Oct 26, 2021
I am also facing this issue
krimple commentedon Oct 26, 2021
Why not back off eslint-config-react-app back to 7.x of eslint in the released version until 8.x is able to be integrated? It makes doing upgrades a bit of a mess. Just a suggestion.
Avasam commentedon Nov 5, 2021
Temporary workaround:
npm i eslint-plugin-flowtype@latest eslint-plugin-import@latest eslint-plugin-react-hooks@next --force --save-devefstathiosntonas commentedon Nov 11, 2021
thanks @Avasam that did the trick
naXa777 commentedon Nov 26, 2021
Temporary workaround for yarn:
yarn add eslint-plugin-flowtype@latest eslint-plugin-import@latest eslint-plugin-react-hooks@next --force -Dmikeislearning commentedon Nov 29, 2021
I just did
yarn add -D eslint-plugin-flowtype@latestand that did the trickstale commentedon Jan 8, 2022
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
kirill-konshin commentedon Jan 10, 2022
Looks like the issue has been fixed.
pc - test coverage, and a fix to problem deploying on Heroku
pconrad commentedon Feb 14, 2022
It is still happening for me... and none of the fixes above are working.
pc - test coverage, and a fix to problem deploying on Heroku
pc - test coverage, and a fix to problem deploying on Heroku
pc - test coverage, and a fix to problem deploying on Heroku
instantlinux commentedon Feb 14, 2022
This fix is really needed now that react-scripts deprecated version 4.0.3 (to my knowledge there will not be a 4.0.4 patch release: we need a way to install 5.0.x). That version has a dependency on immer 8.0.1 with vulnerability CVE-2020-28477, node-forge 0.10.0 with vulnerability CVE-2022-0122, and others. If the issue is "fixed", I sure am having trouble following the thread above or coming up with a way to update my
package.json. Here's what I just gave up trying:eslint-config-react-appfrom 6.0.0 to 7.0.0eslintfrom 7.32.0 to 8.9.0react-scriptsfrom 4.0.3 to 5.0.0I tried some of the
eslint-plugin-xxxitems to devDependencies as well but always hit the error cited in the issue description.instantlinux commentedon Feb 16, 2022
Spent a few more hours on this, it's really impossible to come up with a working
package.json. This is what I want to have working:The number of permutations I've tried with different versions is about 50, and it's just way too much of a headache iterating on a simple issue like dependency updates. How do we get attention paid to this nightmare we face as react developers?
Anishx commentedon Mar 24, 2022
Any update on the issue ? Still having errors
baba43 commentedon Jun 14, 2022
I don't understand why this is causing permanent issues, also for projects that I try to upgrade.
ohcibi commentedon Jan 31, 2023
Nice. Figured I search for eslint before posting an issue to tell that eslint-config-react-app is not providing a new-config-file-format-compatible configuration for eslint. Found 197 open issues with 'eslint'. Half of them stale. At least 3 issues about the incompatibility, one of them also stale. React truly is the best framework in the world (I'm german and that was sarcasm)
dhorkin commentedon May 6, 2023
For me, I ended up needing to do this in Package.json:
Probably would be better to scope those overrides, but I'm not too worried since these are just for linting.