Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acgourley opened this issue Oct 6, 2017 · 21 comments

Comments

@acgourley
Copy link

acgourley commented Oct 6, 2017

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
Copy link

Same problem here.

@chenyunjie
Copy link

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

@Reiji87
Copy link

Reiji87 commented Oct 11, 2017

Same problem here... any solution?

@timothystewart6
Copy link

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
Copy link

fasibio commented Oct 18, 2017

Same problem by android

@welshamy
Copy link

Same problem after upgrading to exp 21.0.0

@kaliabadi
Copy link

Any progress?

@athmangude
Copy link

Kill and restart the packager

@nkov
Copy link

nkov commented Oct 25, 2017

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

@ProteanDev
Copy link

ProteanDev commented Oct 27, 2017

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

@chillyprig
Copy link

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
Copy link

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
Copy link
Member

This should be fixed with the latest template.

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

@marcossk8
Copy link

i'm solved it updating expo on the device

@m-inan
Copy link

m-inan commented Nov 7, 2017

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

react-native@0.49

@aramvr
Copy link

aramvr commented Nov 16, 2017

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

@jiteshwadia
Copy link

jiteshwadia commented Jan 12, 2018

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
Copy link

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

@Laurensdc
Copy link

Laurensdc commented Feb 15, 2018

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests