I get an error when trying to run a React Native app on iOS simulator.
"Unable to resolve module 'react-native/Libraries/Core/ReactNativeVersion' from '/users/...../node_modules/react-native-screens/src/screens.native.js"
It's been absolutely fine for months until i installed a package (moment.js or moment). I believe this is absolutely irrelevant.
RN version 0.47.1
React Version: 16.0.0-alpha12
How can this be resolved?
you probably removed your lockfile or did something that resulted in updating the react-native-screens package. this library isn't compatible to 0.47.1, i recommend updating to a more recent version, ideally the most recent release.
If you are using Expo I would remove any package dependencies (yarn remove react-native-screens) and run expo install react-native-screens to ensure you get a compatible version with your project.
Thanks @GentryRiggen that helped. It seems that react-native-screens and react-native-webview were removed from expo bundle. Probably due to Expo CLI update because I haven't updated Expo SDK .
For strugglers: Now you need to run expo install on each missing package and don't forget to run expo with clean option: expo start -c.
Most helpful comment
you probably removed your lockfile or did something that resulted in updating the react-native-screens package. this library isn't compatible to 0.47.1, i recommend updating to a more recent version, ideally the most recent release.