Do you want to request a feature or report a bug?
A bug.
What is the current behavior?
The most recent PRs are getting failures in CI because ReactDOM. Required module not found and Cannot find module 'react/lib/ReactTestUtils'.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/stopachka/m6z0xn4r/.
It seems like making any PR will trigger this error.
What is the expected behavior?
The tests should not fail for reasons unrelated to the PR.
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
This is in CI on Github.
Our Travis CI build runs npm update, grabbing the latest allowed version of dependencies. It looks like a new minor version of React was released around the time the builds started failing, so something may have changed that is causing this.
It looks like the issue with React 15.4.0 is known and a PR is out to fix it. Just waiting for that to land, and then we can bump the supported versions back to ^15.0.0.
The issue is only related to the AMD format. Does Draft use AMD somewhere?
Cannot find module 'react/lib/ReactTestUtils'.
It looks like it is using incompatible versions of react, react-dom, and react-addons-test-utils. They must all be updated at the same time.
Can you check if bumping both to 15.4.0 fixes the issue?
It's a module mapping issue. Fix is up.
@gaearon and @zpao are correct that the issue I linked to originally is not related. The issue is that React v15.4.0 moved the ReactDOM contents out of react and some of our build system is still looking for it in the react package. The fix @zpao pushed allows Jest to find ReactTestUtils by updating the module-map file.
I'm still looking for the reason that flow is not finding the ReactDOM module. Thanks for the help and patience. Going to try and figure that out and fix it before landing the PR from @zpao.
Most helpful comment
It's a module mapping issue. Fix is up.