-
-
Notifications
You must be signed in to change notification settings - Fork 27k
ERROR in Plugin "react" was conflicted between ".eslintrc.json" and "BaseConfig" #11825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Not sure why, but I removed my yarn.lock file (I use Yarn berry) then I reinstalled the dependencies using |
As strange as it may sound, for me the error happens when I switch from PowerShell to Git Bash. To fix it, I must run twice |
My team and I were able to solve this issue by re-installing all dependencies and removing "plugins": [
- "react",
"@typescript-eslint"
], |
removing this from package.json worked for me: "eslintConfig": { |
So what I noticed. After upgrading the After updating some eslint plugins and parsers I was unable to determine which dependency exactly caused this but there is a list of those that I updated. Maybe this will help. "@typescript-eslint/eslint-plugin": "5.8.1",
"@typescript-eslint/parser": "5.8.1",
"eslint": "8.6.0",
"eslint-config-airbnb": "19.0.4",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-unicorn": "40.0.0", |
Does anyone have a fix which would not affect the functionality? I know that we can get rid of the error by removing the plugins from the config but I don't think the eslint is gonna behave the same right? Btw so far we were not been able to update any of our 6 big projects (all yarn workspaces/mono repos) to CRA 5.0.0 everything is plagued by insane errors which comes mostly from the packages, weird incompatibilities and typescript build errors ... Fixing one problem just lead to another and another... 😞 |
I have the same problem. I removed this from package.json:
And I added
This cause the following error
|
Was having similar issues after updating react-scripts and many other packages in our project. env:
browser: true
es2021: true
extends:
# - 'plugin:react/recommended'
- react
- airbnb
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: 12
sourceType: module
plugins:
- react
rules: {} from this env:
browser: true
es2021: true
extends:
- 'plugin:react/recommended'
- airbnb
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: 12
sourceType: module
plugins:
- react
rules: {} So far so good... |
Uninstall Eslint extension from VScode if you have it. Then run npm uninstall -g eslint, then run npm install -g eslint, reinstall eslint extension in VScode, close your terminal/VsCode and reopen and try again it builds for me now. |
Deleting |
I tried:
For now I've just had to preface |
I found a workaround\resolution for my particular case that I haven't come across whilst googling so adding it here to see if it helps anyone else. On Windows, I was launching VSCode from Powershell using the command Once I restarted VSCode after changing using the correct directory name and case, this issue that was being thrown by my React application disappeared!. Apparently whilst the windows file system isn't case sensitive, the application and coding environment that depends on it is. |
I am with the same problem, the funny thing is that when you save it from the package.json it executes the normal server but if I save it from a component it sends me the same error |
Exactly the same. I even tried to set the environment variable to disable eslint error on start. It doesn't work. |
now I removed this from package.json
this way is useful |
I am with @finnmerlett in that nothing I tried succeeded until using My error: > [email protected] build
> react-scripts build
Creating an optimized production build...
(node:1790) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
(Use `node --trace-deprecation ...` to show where the warning was created)
Failed to compile.
Plugin "@typescript-eslint" was conflicted between ".eslintrc.json" and ".eslintrc.json » ./node_modules/gts#overrides[0] » plugin:@typescript-eslint/recommended » ./configs/base". https://github.com/kennethbigler/react-home/runs/4984838132?check_suite_focus=true You will see it happens both locally and on CI |
Similarly as @aso1datov I've also updated following packages and it works for me. "@typescript-eslint/eslint-plugin": "5.10.2",
"@typescript-eslint/parser": "5.10.2",
"eslint": "8.8.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.3.0",
"eslint-config-standard": "16.0.3",
"eslint-config-standard-react": "11.0.1",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react-hooks": "4.3.0", |
I reproduce this same issue in my local. I fixed this issue by executing "npx eslint --init". |
My issue was fixed by creating the react repository locally on my machine. I didn't notice I was on the OneDrive folder initially when creating the app. Hope this helps someone!!!! |
Thanks, I tried closing the console and opening it again and it solved the problem... Another React project was done in the same console tab, I guess that's where the problem came from. |
Just in case, I solved it by removing all the |
I still experience this issue. |
What I recently did and it works 100% is to create a new reat-app project (using CRA 5+), and move all the files and configurations inside that new folder. |
I had the same problem (Win10, VSCode, npm, CRA + TS) and it was a casing mismatch, like some other people had as well. |
This error indicates that there are 2 copies of I suspect that in my case the issue that
in my This sometimes works fine, if there is only 1 copy of If you are using Yarn modern (v2+) you can try to use
to try to diagnose if and why you have more than one copy of |
If you're using CRA, you basically always have to eject to do anything meaningful, and this is the kind of issue you might see with react-scripts prior to ejecting. |
This issue appeared to me today while I was running npm run build. |
I had the same problem, the issue was that when I cd to the directory where my React app is, I used small first letter of the directory, instead capital, as the directory is named. So the react had problem finding probably the base.js file or something. |
Will anyone solve this problem. |
i added it to my package.json and it worked as well thanks |
This was the problem for me, thanks! |
I had the same problem. I had a configured project with all dependencies being installed and I also had my configured .eslint.yaml, however I ran eslint --init (ignoring the fact I don't have to actually initialize my eslint config because it was already configured) and it prompted me with
|
I solved this issue by upgrading dependencies like @aso1datov and @jpaholik did before me. Specifically, by upgrading the eslint-plugin-react dependency.
|
Check your project path and ensure the cases in your foldres match since bash considers "/Documents" different from "/documents" hence the error or just open your project path on explorer for windows users, right click on the project name and open with your IED. |
when you install react-scripts, example last version such 5.0.1, its has dependencies with eslint-config-react-app => eslint-plugin-react and etc, so you don't need install several packages what conflit with exist in node_module in other package |
If you are still facing this problem, my solution was to clone the repo to a new location, start over and the problem goes away. Hopefully it will work for you too, because I tried everything from this discussion and nothing really helped. |
no problem ;) |
This should be the accepted answer. |
This also worked for me, thanks! |
This is the problem!I override "resolutions": {
"eslint-plugin-react": "^7.32.2"
}, |
Spot on... Yarn Classic...
|
I faced this issue today and resolved it by removing From
To
Below are the steps I followed to resolve that.
|
I removed followings from .eslintrc.json and it worked out;
|
Okay so this issue is finally solve by my own i see a lot of solutions but nothing work so go to your |
I am facing same issue but after changing node version 14 to 16.16.0 its work fine |
Yes, it works. |
Simple solution of this is. Like there is new version of CRA gives built-in eslint so i simply remove all the eslint from package config and delete package.lock file and node module folder also then reinstall my eslint. So for me its work fine |
I got this from above but is it ideal way to resolve this error ? |
After updating to CRA 5.0.0, I got this error on compilation process:
ERROR in Plugin "react" was conflicted between ".eslintrc.json" and "BaseConfig » "..\react-app\node_modules\eslint-config-react-app\base.js".
My eslint configuration is:
Any solutions/fixes?
The text was updated successfully, but these errors were encountered: