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 https://github.com/eslint/eslint/issues. 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 https://atifriaz.hashnode.dev/how-to-fix-error-in-plugin-react-was-conflicted-between-packagejson-and-eslint-config-react-app
Thanks!
Top comments (7)
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.
Thank you! The Saving package.json method made my day!
I'm glad that you found this helpfull
npm uninstall eslint-config-react-app
Thanks saving package.json helped me.
Thats great
[Solved] Plugin “react” was conflicted between “package.json » eslint-config-react-app »