react-element-to-jsx-string: Can't run on react-addons-test-utils@15.4.0-rc.3
Hi I update my react-addons-test-utils to 15.4.0-rc.3, that the error occurs when I run npm test
.
ERROR in .//react-element-to-jsx-string//react-addons-test-utils/index.js Module not found: Error: Can’t resolve ‘react/lib/ReactTestUtils’ in ‘/Users/Welly/Desktop/react-cool-starter/node_modules/react-element-to-jsx-string/node_modules/react-addons-test-utils’ @ .//react-element-to-jsx-string//react-addons-test-utils/index.js 1:17-52 @ .//react-element-to-jsx-string/index-dist.js @ .//chai-enzyme/build/assertions/contain.js @ ./~/chai-enzyme/build/index.js @ ./tools/testing/test-bundler.js
Any solution for this?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (9 by maintainers)
This is not the same issue (notice the module name is different from the one in the thread). Please update to React 15.5.4, and it will be fixed.
For future reference please report issues in RCs to us 😃. This is the reason we publish them.
And by the way the fix works 😃
@Spy-Seth I saw you 👎 my comment
Once this is out and not in RC we can upgrade the library, no idea how untill we get a proper changelog
. I can understand your frustration but please understand this is an open source library and in such anyone can contribute to it. From opening issues to fixing a bug.It took 10 minutes to figure out the root cause so I would recommend anyone opening issues on any open source project to also have a quick look if they can actually fix the issue or dig a bit more into it and find the root cause. The code of react-element-to-jsx-string is no magic. We are not code wizs, it’s simple parsing and using a dependency from react-addons-test-utils. Contribute!
4 people including me participated in this issue and no one took the necessary 10 minutes to run the code and dig it. We are the authors but it does not imply we will fix every bug or add every feature for you, you have to participate.
Once this is out and not in RC we can upgrade the library, no idea how untill we get a proper changelog