re-start icon indicating copy to clipboard operation
re-start copied to clipboard

iOS build failing with error undefined is not an object (evaluating 'nativeVersion.major')

Open acgourley opened this issue 6 years ago • 21 comments

I followed the README instructions precisely I believe. Using the latest Xcode 9 in iOS 11 simulator

screen shot 2017-10-05 at 6 55 17 pm

acgourley avatar Oct 06 '17 01:10 acgourley

Same problem here.

SidecarMaster avatar Oct 11 '17 05:10 SidecarMaster

check the react native version of bundle and the bundle loader.

chenyunjie avatar Oct 11 '17 06:10 chenyunjie

Same problem here... any solution?

Reiji87 avatar Oct 11 '17 11:10 Reiji87

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.

timothystewart6 avatar Oct 14 '17 21:10 timothystewart6

Same problem by android

fasibio avatar Oct 18 '17 13:10 fasibio

Same problem after upgrading to exp 21.0.0

welshamy avatar Oct 18 '17 18:10 welshamy

Any progress?

kaliabadi avatar Oct 23 '17 10:10 kaliabadi

Kill and restart the packager

athmangude avatar Oct 25 '17 13:10 athmangude

I had this problem because I was running a packager for a different project in a different terminal session. (damn you tmux!)

nkov avatar Oct 25 '17 15:10 nkov

Kill and restart the packager, also make sure to terminate properly your terminals by typing 'exit'

ProteanDev avatar Oct 27 '17 09:10 ProteanDev

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.

chillyprig avatar Oct 29 '17 16:10 chillyprig

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?

steelvelveteen avatar Nov 02 '17 09:11 steelvelveteen

This should be fixed with the latest template.

react-native init projectName --template re-start
cd projectName
node scripts/additionalDependencies.js

amoghbanta avatar Nov 06 '17 09:11 amoghbanta

i'm solved it updating expo on the device

marcossk8 avatar Nov 06 '17 14:11 marcossk8

i am having the same problem. app.json { "name":"App", "displayName": "App", "expo": { "sdkVersion": "22.0.0" } }

[email protected]

m-inan avatar Nov 07 '17 05:11 m-inan

I set same "jest-expo" version from package.json file into app.json "sdkVersion". Problem solved!

aramvr avatar Nov 16 '17 12:11 aramvr

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

jiteshwadia avatar Jan 12 '18 10:01 jiteshwadia

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

zachdixon avatar Jan 31 '18 22:01 zachdixon

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. -_-

Laurensdc avatar Feb 15 '18 08:02 Laurensdc

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.

StefanoCremona avatar Feb 17 '18 13:02 StefanoCremona

In Android, gradlew clean and react-native run-android again. Not too sure for iOS but probably do a clean and rebuild like android

fufuninja avatar Apr 22 '18 13:04 fufuninja