[eslint 8.0.0] Failed to load plugin 'flowtype'

Posted 1 month ago

[eslint 8.0.0] Failed to load plugin 'flowtype' #11546

Describe the bug

I'm using react-scripts: next => 5.0.0-next.47. When running yarn build, I get the following error:

Failed to load plugin 'flowtype' declared in 'package.json » eslint-config-react-app': Package subpath './lib/rules/no-unused-expressions' is not defined by "exports"

Did you try recovering your dependencies?

I tried reinstalling dependencies multiple times. Only since upgrading to eslint 8.0.0 I receive this error.

Which terms did you search for in User Guide?

eslint and flowtype.


System: OS: Windows 10 10.0.19043 CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor Binaries: Node: 14.16.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 94.0.4606.81 Edge: Spartan (44.19041.1023.0), Chromium (94.0.992.38) Internet Explorer: 11.0.19041.1202 npmPackages: react: 17.0.2 react-dom: 17.0.2 react-scripts: next => 5.0.0-next.47 npmGlobalPackages: create-react-app: Not Found

Steps to reproduce

  1. Update eslint to 8.0.0
  2. Run yarn build

Expected behavior

Succesful build of the application.

Actual behavior

Failed to compile, resulting in an empty build folder.

Reproducible demo


Created 1 month ago

Duplicate of #11374 ?

Created 1 month ago

Closing in favour of #11374 - thanks @MieleVL and @Samuel-Beslogic.

For context, this happens with every major ESLint release. It takes a time for all plugins to update.