In this article, we will see the error Plugin “react” was conflicted between package.json and eslint-config-react-app and its solution. It generally arises when there is a conflict in naming convention or package.json data. However, this is not the only reason for this conflict. Some of the other reasons can be due to a different version or conflict in project dependencies.
Error:
Solution 1: First of all, make sure your naming conventions are right, (Try using lowercase most of the time).
The Error
This example fixes the conflict because of the naming convention difference. We need to be careful with uppercase and lowercase to avoid this error. Notice the change in the path in the following two pictures.
Picture 1: Notice geekforneveropen
This error is common in the windows operating system if there is any kind of difference in your naming conventions. Open your project explorer and go to the correct directory, check if the name follows the same case and run the project again.
Picture 2 : Notice neveropen
If the error still persists then we will follow another approach.
Solution 2: This example fixes the error by installing the updated version.
If the naming convention is right, then do the following steps:
- Delete the npm module and package-lock.json( not package.json,) from your project
del package-lock.json del -f yarn.lock // Or open the folder in IDE delete package-lock.json. delete npm modules
- Re-install the node modules.
install node module using npm install
- Delete and reinstall the eslint
yarn remove eslint-config-react-app yarn add --dev eslint-config-react-app
Solution 3: Now, We need to update the version. Use the following syntax to update the module.
#use this to install the latest version. npm install -g npm@latest
To update the latest version
To conclude, this problem can be solved using the above three fixes, one to check if the naming conventions and the version are correct. Some other ninja hacks can be re-installing the whole module if possible or starting the project using nodemon or yarn. Happy coding!