Open In App

Plugin “react” was conflicted between “package.json » eslint-config-react-app

Improve
Improve
Like Article
Like
Save
Share
Report

The error Plugin “react” was conflicted between package.json and eslint-config-react-app 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 image from Terminal Window:

We can use these approaches to solve this error

Approach 1: Correct Naming Conventions

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 geekforgeeks

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 GeeksforGeeks

If the error still persists then we will follow another approach.

Approach 2: Updating dependencies

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.: Usethis command in Terminal to install node modules
npm i
  • Delete and reinstall the eslint
yarn remove eslint-config-react-app
yarn add --dev eslint-config-react-app

 

Approach 3: Updating node package manager (NPM)

Now, We need to update the version. Use the following syntax to update the module.

Step to Update NPM: 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!


Last Updated : 31 Oct, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads