Legitcode / tests

Chainable, easy to read, React testing library
248 stars 7 forks source link

Cannot find module "react/lib/ReactTestUtils" - react@15.4.0 #42

Open luisrudge opened 7 years ago

luisrudge commented 7 years ago

Since the update, I'm getting the error Cannot find module "react/lib/ReactTestUtils"

Probably related to this: https://github.com/facebook/react/issues/8314

zackify commented 7 years ago

Did npm install react-dom --save fix it?

luisrudge commented 7 years ago

I already have react-dom in my app

zackify commented 7 years ago

Well nothing in this library pulls from react/lib. So I'm not sure how to help :/

luisrudge commented 7 years ago

Yeah.. I searched for that as well, but couldn't find anything. I just posted here to see if someone else was having the same issue. It's probably an out of date dependency

7s4r commented 7 years ago

Try to update your package react-addons-test-utils to latest. I fixed this error by updating from "^15.1.0" to "^15.4.1". And also "react" to "^15.3.2" & "react-dom" to "^15.4.1".

activedecay commented 7 years ago

with "react": "15.3.0" ran into this error; it was fixed with "react": "^15.4.1"

ERROR in ./~/react-dom/lib/ReactDOMUnknownPropertyHook.js
Module not found: Error: Can't resolve 'react/lib/ReactComponentTreeHook' in '/home/jfaust/Documents/hack/react-boilerplate/node_modules/react-dom/lib'
 @ ./~/react-dom/lib/ReactDOMUnknownPropertyHook.js 15:29-72