Post CRA v5 Update - App Broken #542
Replies: 1 comment 4 replies
-
Hi @neillindberg. This would be easier to investigate with some repo debug, but I'll do my best. First of all, if you are using CRA, you shouldn't need to install all the ESLint plugins or Testing Library manually since they are included in CRA. Actually, installing ESLint plugins manually could lead you to have 2 different lint results so be careful with that. Anyway, CRA v5 relies on Let me know if this helps to solve your problem. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After udating an existing project to create-react-app version 5 my project fails to compile with:
Failed to load plugin 'testing-library' declared in '.eslintrc': Class extends value undefined is not a constructor or null
My .eslintrc looks like this (sans rules and import/resolver setttings):
And, my dev dependencies like this:
So to squash the error I found I had to install
eslint-plugin-testing-library
.But, what is unclear to me is with this library do I uninstall the two
@testing-library
entries in my dev dependencies?Following the documentation here I had adjusted my .eslintrc, moving the extends entry "plugin:testing-library/react" to an "overrides", just exactly as outlined in the docs here on the github for eslint-plugin-testing-library:
But, now I'm back to the error I was getting in the beginning, except the location is in the overrides block instead of at the root of my .eslintrc:
ERROR in Failed to load plugin 'testing-library' declared in '.eslintrc#overrides[0]': Class extends value undefined is not a constructor or null
Referenced from: ...path ommitted.. /.eslintrc
What am I missing? Do I want to uninstall the older
@testing-library
entries? BTW, if I do that I get the same errror, but in using this package do I want to uninstall the others, regardless of the error I'm getting?I can't find anything on StackOverflow around this so here I am.
Thanks for any good direction,
Neil
Beta Was this translation helpful? Give feedback.
All reactions