ERROR:evaluating nativeVersion.major

#1

hi, I use create-react-native-app create a new CRNA project, and did not modify anything. But when I run ‘npm start’ or ‘npm run android’, it all gives below error:

undefiend is not an object(evaluating nativeVersion.major)

Help Please! Here is ‘package.json’:

“dependencies”: {
“expo”: “^22.0.0”,
“react”: “16.0.0-beta.5”,
“react-native”: “^0.49.5”
}

#2

I am also getting the same error in android after upgrading a detached app from Expo v21 to v22 today.

#3

I fixed my issue by installing the correct version of React as mentioned in the SDK 22 release notes. I had React v16.0.0 instead of v16.0.0-beta.5 :slight_smile:
But it is a bit odd that I had this error in Android only after upgrading to SDK 22 since I had React 16.0.0 with SDK 21.

#4

@plig maybe @cosmocoder’s fix above works for you too?