-
Notifications
You must be signed in to change notification settings - Fork 3
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
Resolve error with invalid context of styled-components #2
Comments
Most probably it's caused by different versions of styled-components used in project and jest-puppe-shots, at least it was a case in my situation, when I changed styled-components in jest-puppe-shots to peerDependency it started to use the one from root of my project and it no longer shows this error. But it lead to new problem, in new version of styled-components directory lib has been completely removed so there is error in renderer of styled components. Here is issue about this problem: styled-components/styled-components#1483 |
I downloaded this project and tried to fixed it by myself, but I don't know how to build this this project so I can't test it with real app, I'm quite new to lerna and this kind of stuff. :( Fixing it is quite simple, styled-components needs to be moved to peerDependencies and at least "3.0.0" (as it had some breaking changes) and one line in styled components renderer, I could create PR but as I said, I can't test it with real app so I'm not sure if it works correctly... |
Sounds good. You can create a Pull Requests if you have some code and I can test it later this weekend. As for testing development version:
If you will make changes in the puppe-shots project all the change should be visible in your test project. If you would like to remove the linked packages, simple run Let me know if this helped. |
Any news on this fix? |
When running test that is using
STYLED_COMPONENTS
as a renderer there is a problem with React context:The text was updated successfully, but these errors were encountered: