react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

Unable to resolve module: ReactNativeVersion

Open chai86 opened this issue 7 years ago • 3 comments

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?

chai86 avatar Jan 03 '19 16:01 chai86

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.

brentvatne avatar Jan 03 '19 21:01 brentvatne

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.

GentryRiggen avatar Jan 30 '20 21:01 GentryRiggen

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.

swayok avatar Jan 31 '20 10:01 swayok