Open alburritos opened 7 years ago
That is definitely not enough info/context. React version, component structure, etc. Please create Codepen/jsbin example that can reproduce the issue, otherwise I have no idea 🤷♂️
I reckon I've seen this kind of error somewhere on my projects, but don't remember all the details. Probably was related with incorrect exports somewhere or mapper function within react tree
Try deleting your node_modules folder and run yarn or npm install again, then rerun your build process / file watcher.
This error might happen if two separate versions of react-dom are loaded, e.g., by oneself (index.js) and another dependency (react-apollo) on the server side when used for SSR. Are you trying to render react-motion on the server side?
+1 @msand solution doesn't work for me. Once all the packages are installed, I still get the same error.
It happened to me as well, but i have no react-motion
installed, it happened to me in latest react-native
version 0.45.1
.
Now to search an answer to my issue.
@luchillo17 i'm also facing same problem.....
please help
@mistryhiren94 You facing it with react-motion
installed or without it?
Facing same issue without react-motion.
So seeing a few are getting the error without react-motion
i would dare to say it's most likely an error in React Native or React, or maybe the mismatch of their versions (i just recently knew that React Native is made to be compatible with specific versions of React).
@luchillo17 thanks
I had exactly the same problem in two projects.
In the first project that I have, I updated jest to 20.0.4 and babel-jest to 20.0.3 and everything worked like a charm.
In the second I had to do, 1) Delete node_modules folder 2) npm install 3) npm update
Make sure you're on the same version of all the related dependencies.
For example, I just got this issue after upgrading to react-native v0.45.1
. I fixed it by installing react v16.0.0-alpha.12
and react-test-renderer v16.0.0-alpha.12
to match (you can find the correct version number in react-native
's package.json
).
Upping the version of react from react v16.0.0-alpha.6
to react v16.0.0-alpha.12
fixed this for me thanks @cooperka
https://github.com/react-community/create-react-native-app/blob/master/VERSIONS.md Like @cooperka said, we need match version. Please look above page to correct version
I ran into the problem when executing my Jest tests for the first time. I hadn't updated my package.json dependencies for a while (not using React 16), that's why I had to update them. I used npm-check-updates
as a neat node package for it:
npm i -g npm-check-updates
npm-check-updates -u
npm install
For me the problem was that i was using React 15.x.x. I updated to 16 and now I don't get this problem with Jest anymore
I got this issue because I did not include react as a dependency
I also had the problem with React 15 and jest, but updating to 16 was not an option. Downgrading react-test-renderer to ^15 worked though.
@RobertApelian Worked for me! Using react
15.5.4 and react-test-renderer
15.6.2 now.
@RobertApelian Worked for me! Thank you.
Updated to react 16.3.2 worked for me too
For me the problem was that I had react and react-dom different versions. Updating those fixed the problem.
@Snnapy resolve the problem after match both version, thank you.
React and React dom version might be mismatch.. Example... React 15.4.2 needs version less 16 .x React dom
I'm new to React Motion, and spent all day yesterday trying to get what I need. However, I can't figure out what has caused this issue
I've been playing around with the demos and currently this is what I have. If this is not enough code, please let me know!
What is causing the error?