-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Configuration conflict with 7.27.0 #3128
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
It’s likely that CRA doesn’t use a semver range when depending on this plugin - if so, you simply can’t upgrade until CRA does. |
I am using a long ago ejected CRA. |
That doesn’t matter if it’s still using react-scripts, which is the thing that incorrectly pins its dependency versions. |
Oh I see, sorry. I will try to check on their repo and post an update. |
Since I am ejected I am not using react-scripts package in my application. However, here is what I found:
So again I do not understand the issue here. |
In that case it should be fine. You may need to dedupe eslint-plugin-react in your lockfile. Does eslint-config-react-app ail to include eslint-plugin-react as a PEER dependency? |
I cleared my .lock file and now it works. Thanks for your quick help. |
Which file did you clear to fix this issue? I'm now having serious issues with this conflict |
I am using yarn and relatively frequently, the .lock file becomes corrupted after some |
it's still showing the error even after deleting the lock file and running |
I am also having this issue, but removing the lock files only temporarily solves the issue, error for me looks like this:
|
@MartijnGevaert if you’re using CRA, you’re forced to stick with whatever version they use. |
Thanks for your reply. Failing to do this I realised that you might mean removing |
The unfortunate reality with CRA is that you need to eject to do anything meaningful. |
Removing package-lock.json and re-installing does not seem working. Please what is the way forward as this is a very serious blocker in my current app. |
@crud-engr if you’re using CRA, then the blocker is CRA itself. If not, then please file a new issue. |
Had this issue too with CRA 5. Used Then I set the exact version and got happy-happy-joy-no-error. I can understand why nuking the package-lock.json and doing it again could fix it, because then it sorts the version numbers out so they match. But then all your other dependencies may need rejigging... and that might not be possible for some. So I guess it's perhaps ultimately an issue with npm dependency resolution when you add something which uses peer dependencies and there's a conflict. Or maybe now it's warning us, and before it didn't. Mystery. |
Hmm I've just worked through this thread but nothing seemed to help sadly. Not sure what else to do. It works fine in another project, though the front-end is all in the root of the project and not seperate into a /client and /server |
@AlexMachin1997 if you're using a "workspaces" setup, make sure that the plugin and eslint versions are the same throughout the repo. |
I meant yarn, or npm, or lerna, or any other monorepo tool. You're doing that in the sense that you have a root package.json, and two subfolders each with their own package.json. If you use the real terminal - the one inside your editor doesn't count - and run the eslint command directly inside Unless you're using a workspaces tool, you can't really lint the subprojects from the root, which is usually what editor integrations do. |
Ah. Yeah I've organised them like that just to seperate them. I can't do that, all of the linting is done in the root of the project, basically in the root package.json I have some commands to manually lint the code see here |
In that case, |
Would you mind providing an example with how that would work ? Seems like duplication but I'm probably missing something to fully understand it. I didn't need to do this in a previous version of react-scripts and it worked fine hmm strange. |
Ok, so the issue is conflicting versions. I use resolutions field in package.json with yarn, or overrides field in package.json for npm projects to force the only package version in the repo. |
I've heard of "resolutions", though not too sure how it would work. Questions:
Sorry for all of the questions, this is an area of web development I know very little about 😅 |
@AlexMachin1997 yes, it’s duplication, but that’s the choice you made by making a monorepo and also not using the available tooling for that. |
I didn't intentionally make the choice, I did it by accieent by just wanting to reorganise my project though I see an area I can invetigate further. Monorepos seems really cool, I just need to learn more about them and set up a dummy project with whatever tools are available. For now I've moved all the react stuff into the root and it works perfectly, I'll add that to the list of improvements for the arcitecture. |
This issue :
Is happening now with all my CRA applications after trying to rename some directories in one CRA app |
facebook/create-react-app#11825 (comment) This has fixed my issue - Please refer to this other thread relating to the this issue |
Removing |
add |
Adding
|
This should be reopened. It seems like this plugin is no longer compatible with |
@curtvict please file a new issue. |
jsx-eslint/eslint-plugin-react#3128 removed old version "eslint-plugin-react" && "root": true in .eslint.json
It may not be the most technical solution, but when i had this issue, it got fixed when i stopped the compilation in the console and then ran it again |
Just opening the package.json and saving once worked for me. Don't know why |
After updating from 7.26.1 to 7.27.0 I am getting an error when launching my application in debug.
I am getting the following error:
Reverting to 7.26.1 fixes the issue.
The text was updated successfully, but these errors were encountered: