react-everywhere / re-start

react-native template to target multiple platforms :globe_with_meridians: :iphone: :computer: with single codebase.
https://medium.com/@amoghbanta/write-once-use-everywhere-with-react-native-d6e575efe58e#.nfl50gwfg
MIT License
1.3k stars 85 forks source link

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

Open acgourley opened 6 years ago

acgourley commented 6 years ago

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
SidecarMaster commented 6 years ago

Same problem here.

chenyunjie commented 6 years ago

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

Reiji87 commented 6 years ago

Same problem here... any solution?

timothystewart6 commented 6 years ago

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.

fasibio commented 6 years ago

Same problem by android

welshamy commented 6 years ago

Same problem after upgrading to exp 21.0.0

kaliabadi commented 6 years ago

Any progress?

athmangude commented 6 years ago

Kill and restart the packager

nkov commented 6 years ago

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

ProteanDev commented 6 years ago

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

chillyprig commented 6 years ago

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.

steelvelveteen commented 6 years ago

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?

amoghbanta commented 6 years ago

This should be fixed with the latest template.

react-native init projectName --template re-start
cd projectName
node scripts/additionalDependencies.js
marcossk8 commented 6 years ago

i'm solved it updating expo on the device

m-inan commented 6 years ago

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

react-native@0.49

aramvr commented 6 years ago

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

jiteshwadia commented 6 years ago

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

zachdixon commented 6 years ago

Not sure which one of these fixed it but I just did everything I could think of:

Laurensdc commented 6 years ago

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

StefanoCremona commented 6 years ago

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.

fufuninja commented 6 years ago

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