DEV Community

Cover image for How to Fix ERROR in Plugin 'react' was conflicted between 'package.json' and 'eslint-config-react-app'?
Atif Riaz
Atif Riaz

Posted on

How to Fix ERROR in Plugin 'react' was conflicted between 'package.json' and 'eslint-config-react-app'?

If you're seeing the error message "Plugin 'react' was conflicted between 'package.json' and 'eslint-config-react-app'" then it's likely that you have a conflict in your project's dependencies.
*There are a few ways to resolve this problem: *

Solution 1: Check the DIRECTORY name

Make sure the directory name is not capitalized. For example, the directory name "Reactapp/REACTAPP/React-app" will throw this error, but "reactapp/react-app" will not. Sometimes casing may cause issues.

Solution 2: downgrade to version 6.

If you're using yarn, you can **downgrade **to version 6.8.0 of the eslint-config-react-app package by running the following command:
yarn add --dev eslint-config-react-app@6.

Solution 3: Save the package.json file

If you're using a package manager other than yarn, you can try saving your project's package.json file (ctrl + s) and running the command again.

Solution 4: Uninstall eslint-config-react-app and reinstall it.

If the above solutions don't work, you can try uninstalling eslint-config-react-app and reinstalling it:
yarn remove eslint-config-react-app
yarn add --dev eslint-config-react-app

Solution 5: Remove the conflict from your project's dependencies.

If you're still seeing the error, it's likely that there is a conflict in your project's dependencies. You can try removing the conflicting dependency from your package.json file and running the command again.

If you're still seeing this error after trying these steps, please file a bug report at Include your project's dependencies and versions, as well as your ESLint configuration.

Originally this post is added on my hashnode profile first and here is the link


Top comments (7)

ba999zai profile image
Иван • Edited

I had the same error but couldn't find a solution to this problem anywhere. Even npm uninstall eslint didn't help. As a result, I removed all references to eslint in the package.json and package-lock.json files and the error went away.

abnernavarrom profile image
Abner Navarro

Thank you! The Saving package.json method made my day!

iamatifriaz profile image
Atif Riaz

I'm glad that you found this helpfull

stevenzion profile image

npm uninstall eslint-config-react-app

romantimilsina profile image

Thanks saving package.json helped me.

iamatifriaz profile image
Atif Riaz

Thats great

exerror8 profile image