Skip to content
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 with react-scripts 5 #462

Closed
kelbyers opened this issue Nov 2, 2022 · 5 comments

Comments

@kelbyers
Copy link

kelbyers commented Nov 2, 2022

I'm using react-scripts 5.0.1, and get this error when running craco test:

TypeError: Cannot read properties of undefined (reading '_cracoConfig')

The same changes mentioned in #425 fixed the issue, but updating to craco 6.4.5 did not resolve the issue.

@dilanx
Copy link
Owner

dilanx commented Nov 2, 2022

What version of craco are you using?

@kelbyers
Copy link
Author

kelbyers commented Nov 3, 2022

I tried both 6.4.3 and 6.4.5. I currently have 6.4.3.

@dilanx
Copy link
Owner

dilanx commented Nov 8, 2022

Try using craco 7 (it just moved from alpha to latest) because craco 6 does not support CRA 5.

@kelbyers
Copy link
Author

kelbyers commented Nov 8, 2022

I'll give it a try tomorrow. I'm also using craco-antd, which also uses craco-less, and those set their peer dependencies to exactly version 6.4.3. I can configure my environment to use craco 7 instead, though.

@kelbyers
Copy link
Author

kelbyers commented Nov 9, 2022

craco 7 did resolve my issues. Thanks! It was still a beta when I looked earlier, and I didn't think to check if it had been released when I ran into the issue.

@kelbyers kelbyers closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants