Getting the following message when i init a new project and then launch the x-code emulator. "React-Native Version Mismatch" Javascript Version 0.50.1 Native version: 0.50.0
Make sure you have rebuilt the native code...
Does anyone know what is going on here and can help me?
Thanks!
Possible Fix:
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/haste-map-react-native-packager-* && rm -rf node_modules/&& npm install
If the problem persists, try to execute the project directly from the Xcode
This worked for me.
This is what I've done with it:
You may forgot to close nodejs terminal from another project, and they happen to have installed different react version.
So the code fetch from nodejs server conflicts with native one.
I have got the same issue while building my react native app for android and I did the following which worked for me.
The "JavaScript version 0.50.1" in the error console is the react-native version in your
package.json
file. Make sure it is the same version as "Native version 0.50.0" in the error console.react-native run-android
.For me it was due to
react-native
version independency
section ofpackage.json
file. It was:I chaged it to:
Now it works fine.
Make sure also that the wifi is enabled in your emulator
just force react native version in your android's app level gradle file, in the
dependencies
section.worked for me