Unable to convert existing reactive example for Expo: error with nativeVersion.major

Just download the latest version of Expo XDE (2.20.1) and try to convert your own project to it. I followed these steps, and, opening the application in the Expo client on a real device, I received an error message:

undefined is not an object (rating "nativeVersion.major")

The problem occurs on both Android and iOS.

Expo seems to have a strict requirement for responsive / gender-responsive versions, but unfortunately I can't find a list of version requirements.

My current dependencies (which are fairly modern): "react": "16.0.0", "react-native": "0.49.3"

So, is this error really due to version conflicts? And if so, how can I solve the problem?

+6
source share
3 answers

Your JS dependencies must match your own code. With the Expo SDK 21, which is based on React Native 0.48, you can either use (recommended):

"react": "16.0.0-alpha.12",
"react-native": "https://github.com/expo/react-native/archive/sdk-21.0.2.tar.gz",

or

"react": "16.0.0-alpha.12",
"react-native": "^0.48.4",

When updating dependencies, it is important to keep track of versions. The upcoming React Native 0.49 (supported by Expo SDK 22) should use React 16.0.0-beta.5.

+4
source

The easiest way is to create a new Expo project from scratch and then copy your components. I did this several times myself, and it is much easier than fighting with any boundary condition.

+2
source

Delete the iOS build ( ./app/ios/build) folder and recreate it.

0
source

All Articles