iOS build failing with error undefined is not an object (evaluating 'nativeVersion.major')
Opened this issue ยท 21 comments
Same problem here.
check the react native version of bundle and the bundle loader.
Same problem here... any solution?
I had a similar issue because I manually updated a few things. The current CRNA
generates an app with these versions:
package.json
{
"name": "my-project",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "1.5.0",
"jest-expo": "^21.0.2",
"react-test-renderer": "16.0.0-alpha.12"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^21.0.0",
"react": "16.0.0-alpha.12",
"react-native": "^0.48.4"
}
}
app.json
{
"expo": {
"sdkVersion": "21.0.0"
}
}
After reverting some of my updates, it started working again.
Same problem by android
Same problem after upgrading to exp 21.0.0
Any progress?
Kill and restart the packager
I had this problem because I was running a packager for a different project in a different terminal session. (damn you tmux!)
Kill and restart the packager, also make sure to terminate properly your terminals by typing 'exit'
according to this docs: https://github.com/react-community/create-react-native-app/blob/master/VERSIONS.md
make sure you update the sdk version correctly in app.json too.
Hi, I am having the same problem. Both in the app.json and the package.json files I have version 22.0.0 and nothing works. It's being really painful. Any fix for this by now?
This should be fixed with the latest template.
react-native init projectName --template re-start
cd projectName
node scripts/additionalDependencies.js
i'm solved it updating expo on the device
i am having the same problem.
app.json
{ "name":"App", "displayName": "App", "expo": { "sdkVersion": "22.0.0" } }
react-native@0.49
I set same "jest-expo" version from package.json file into app.json "sdkVersion". Problem solved!
Having the same problem here.
"react": "16.0.0",
"react-native": "0.50.1",
Tried killing and restarting the packager, npm install. But the error is still there
Not sure which one of these fixed it but I just did everything I could think of:
- Uninstall expo from simulator
- Close simulator
- Stop packager
- Delete node_modules folder
- yarn/npm install
- Start packager and simulator
I hate to do this as a developer, but from someone completely outside of the IT realm, I learned this invaluable solution to almost any problem I just can't fix:
Turn it off and on again...
Restarting laptop did the trick for me. -_-
In Android I had the same problem under the release configuration. It was because I had a boundle created with a previous build. It was enough to recreate the bundle.
In Android, gradlew clean and react-native run-android again. Not too sure for iOS but probably do a clean and rebuild like android