[Fix] ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js”

Recently I updated my CRA to version 5.00., when I tried to run my eslint configuration I got across an unexpected error during the compilation process : “note: This error originates from a subprocess, and is likely not a problem with pip”. A snippet of the error is given below

ERROR in Plugin "react" was conflicted between ".eslintrc.json" and "BaseConfig » "..\react-app\node_modules\eslint-config-react-app\base.js"

I would like to share the steps that helped me out to fix the error, ‘ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js”..’

Why ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js” error is seen?

This error is seen because the eslint-plugin-react version in your project’s file is “different” from code in eslint-config-react-app package’s dependency, hence a conflict is caused, thus showing an error. Many solutions talk about deleting the .lock file in your project to avoid the error.

Although this may solve the but its not ideal as the .lock file is there for a reason. Instead, dedupe its entries and then re-install.

A detailed solution to fix the error ‘ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js” ‘ is provided below:

How to Fix ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js”?

While using yarn and that too, frequently; the .lock file becomes corrupted after some yarn upgrade-interactive commands. Instead of deleting the .lock file, dedupe its entries and then re-install.

Step 1 : dedupe the entries of the .lock file and then re-install

For yarn users:

To fix the error ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js” for yarn users run the following command

npx yarn-deduplicate && yarn

For npm users:

To fix the error ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js” for npm users run the following command:

npm dedupe && npm i

The above fix should solve the error ‘ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js”‘

Step 2 : Deleting the .lock file

If the above steps do not work to solve the error ‘ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js” Then it’s likely that your .lock file has become corrupted.

Deleting the .lock file should fix the error ‘ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js”

Conclusion

To fix the ‘ERROR in Plugin “react” was conflicted between “.eslintrc.json” and “BaseConfig » “..\react-app\node_modules\eslint-config-react-app\base.js” error; First, try to dedupe the enries of the .lock file by running the appropriate commands depending on your usage of yarn or npm. If the above step does not help to fix the problem, try to delete the .lock file that should fix the problem immediately.