React-native-screens: Unable to resolve module: ReactNativeVersion

Created on 3 Jan 2019  路  3Comments  路  Source: software-mansion/react-native-screens

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?

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.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thomasgosse picture thomasgosse  路  4Comments

ArekChr picture ArekChr  路  5Comments

jeveloper picture jeveloper  路  5Comments

chengsokdara picture chengsokdara  路  3Comments

bartzy picture bartzy  路  3Comments