Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when deploying react app and it keeps sayings << Plugin "react" was conflicted between "package.json » eslint-config-react-app » >>

I have been having a little bit of issues when deploying my create react app, as it fails to compile and tells me Plugin "react" was conflicted between "package.json » eslint-config-react-app »

I was wondering if somebody has encountered the same issue and knows how to solve it, thank you! I am still very new to all this.

eHere is what my windows powershell tells me once I npm start and launches

This is what my localhost looks like once my react app launches

like image 985
Ruben Avatar asked Dec 16 '21 10:12

Ruben


People also ask

How to fix Plugin react was conflicted between package json?

If you're seeing the message fix the error "Plugin "react" was conflicted between “package. json » eslint-config-react-app»" then it's likely that you have a conflict in your project's dependencies. To Fix Plugin "react" was conflicted between "package. json >> eslint-config-react-app >> Error just Locate the folder.

How do I disable Eslint create react app?

As of react-scripts v4. 0.2, you can now opt out of ESLint with an environment variable. You can do this by adding it to your . env file, or by prefixing your scripts in your package.

How to fix error in plugin ‘react’ was conflicted?

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. Make sure the directory name is not capitalized.

Why is my plugin 'react' being 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. Make sure the directory name is not capitalized.

How to fix ESLint-config-react-app is not working?

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.

How do I fix a package error in Visual Studio Code?

As a workaround, open the package.json file in VS Code and save it (ctrl+s), then it works. You may need to repeat this step each time, a bit annoying. Okay but this is not sustainable because the minute you make a change in any other file and save it, you're back to the error.


6 Answers

There is a conflict in the casing

C:\Users\Ruben|desktop\reactapp\test.... whereas the nodemodules is looking for C:\Users\Ruben|Desktop\Reactapp\test....

This is a windows specific problem, and previously react would have run the app regardless of this difference. Not anymore it seems.

The solution I used was to locate the folder and open with code; that ensures that the path matches directly with what is stored in node modules

like image 68
blossom-babs Avatar answered Oct 17 '22 06:10

blossom-babs


Faced with the same issue on Windows 10 & VS Code & npm. As a workaround, open the package.json file in VS Code and save it (ctrl+s), then it works. You may need to repeat this step each time, a bit annoying.

like image 41
ihsany Avatar answered Oct 17 '22 07:10

ihsany


The error occurred from the terminal, i had similar issues for a long time trying series of things from trying to update my dependencies using "npm install" to saving the package.json file, but all this approach will only fix the issue temporarily. The best and permanent solution is for you to cd into the project correctly from your terminal, the latest react is sensitive to the casing. e.g. you cd into C:\Users\Desktop\reacttutorials\antd-demo while the correct path is C:\Users\Desktop\ReactTutorials\antd-demo

Note the change in the casing.

like image 23
Olami Olasunkanmi Avatar answered Oct 17 '22 06:10

Olami Olasunkanmi


Just re-save package.json, that worked for me.

like image 32
ThomasNL Avatar answered Oct 17 '22 05:10

ThomasNL


I also ran into this problem on a Mac. As a temporary workaround, I was able to fix this by downgrading to version 6, by running

yarn remove eslint-config-react-app

followed by

yarn add eslint-config-react-app@6

I ran this twice. Always failed with version 7 (eslint-config-react-app without the "@6"), and always succeeded with version 6. YMMV, especially if you really need version 7.

like image 5
Patrick Chu Avatar answered Oct 17 '22 07:10

Patrick Chu


I got this error when installing React with Visual Studio 2022 Standalone React project. The problem was Visual Studio showed my project name in Capitalized (as I typed), however, the folder name was in small-caps.

The fix was to manually rename the folder name to match the project name as shown in Visual Studio.

like image 3
curious.netter Avatar answered Oct 17 '22 07:10

curious.netter