-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
react-addons-test-utils 15.4.0 now depends on react-dom instead of react #8314
Comments
Seriously, that's a breaking change that can take CI systems down. Is it documented somewhere? |
I think we have all various experiences with this bug, let's keep it constructive and see if we can do something about it so that we focus on positive not negative comments. |
That's indeed frustrating but this ship has sailed now. Sorry we screwed it up. We released 15.4.0 RC a month ago and publicly asked for feedback:
Unfortunately nobody reported this issue even as it was discovered in algolia/react-element-to-jsx-string#56 before the stable release. Sorry for breaking your CIs, hopefully the fix wasn't too complex. |
Im now experiencing while integrating Mocha + Typescript. :( |
All you need to do is to add the dependency on |
A work around to make CI work,
|
I got bit by react-addons-test-utils 15.4.1 not being compatible with react 15.2.1. Makes me wish that npm shrinkwrapped dev dependencies as well (which up until now I assumed it did). Is backwards compatibility of major versions a goal for react-addons-test-utils? |
React does not currently support using different versions of its packages in one project. We are working to decouple them to the point it is possible but this will take us a while. |
Module react-addons-test-utils and react-dom should use same version, otherwise test would fail to start. Ref: facebook/react#8314
https://www.zhoulujun.cn/html/tools/webpack/2016_0217_6459.html |
Module react-addons-test-utils and react-dom should use same version, otherwise test would fail to start. Ref: facebook/react#8314
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
react-addons-test-utils 15.4.0 has a peer dependency on
react-dom
and uses it, 15.3.0 had a peer dependency onreact
.In 15.3.0, react-addons-test-utils/index.js:
In 15.4.0, react-addons-test-utils/index.js:
If your code contains:
It will fail given your current dependencies.
So if you did not have react-dom in your dependencies, because previously it was not needed, now it is and it will break your code.
Is this a breaking change?
This leads to errors like:
Module not found: Error: Can't resolve 'react-dom/lib/ReactTestUtils'
orCannot find module 'react-dom/lib/ReactTestUtils'
Current workaround
The text was updated successfully, but these errors were encountered: