-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
Craco with jest 27 createTransformer and _cracoConfig undefined problem after updating from v4 #425
Comments
@klougod could you share more information about the issue you're having? |
Sure, I have a CRA ejected application, and after updating from craco v4 to craco v6 and the dependency of babel-jest being the version 27 broke all my tests. Version 24 to 26 wasn't working too but I thought it was due to the update, after updating to babel-jest 27 I got this errors: Cannot read property createTransformer of undefined An important detail is that everything else works, builds, development environment, etc. It was a problem only in tests. Best regards |
Thanks @klougod. Feel free to submit a PR with your fix and I'll take a look. |
Fixes undefined properties error in tests (closes issue #425)
First time commenting but first, thank you for this project :D Don't know if this is related but I was on |
Good to know, @ryuash01. Can you share the errors you received? |
Basically the exact same error as this issue. Everything works fine until testing. |
I can confirm what @ryuash01 is saying, and our setups are the same. I was already on One tip to others who try to downgrade, I did have to run |
Good to know. In that case, I wonder what caused the original issue. Do different versions of @klougod if you downgrade your version of babel, does it resolve the issue? If this seems to be a breaking change for older versions of CRA, I can undo these changes early next week in a new patch release. What version of babel do you guys use @ryuash01 @AndrewCraswell? |
We're using |
I just checked out the v4.0.3 tag of I think the best option here is to release a new patch that resets the changes made in 6.4.4, which I can try to do right now. As for @klougod and others that have this issue, I suspect that this issue occurred because you have an ejected CRA project and have updated |
@dilanx HI, I've tried to downgrade the babel-jest to version 26 but then I got another issue related to compatible versions I think, I'm using the react-scripts v5 btw. Thanks. |
@klougod okay that makes sense. That's my fault for forgetting to ask which version of I just released craco v6.4.5 which should be the same as v6.4.3 (if you unpublish a version with npm you're unable to use that version tag ever again so it's usually better to always increase the version). Please let me know if there are any other issues. |
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@craco/craco@6.2.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: