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 and Android app bundle failure #21420

Closed
nos-joel opened this issue Sep 29, 2018 · 5 comments
Closed

iOS and Android app bundle failure #21420

nos-joel opened this issue Sep 29, 2018 · 5 comments
Labels
Platform: Android Android applications. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@nos-joel
Copy link

Environment:
MacBook Pro
Xcode v9.4
CLI v9.4
both Android and iOS app

Sept. 29/2018
Error when installing RN app with native code(react-native init AwesomeProject) and attempting to load the app with iOS simulator or Android device. I also followed the steps to resolve the issue, but still the same problem. This is not an older project but a new one.

.babelrc

{ "presets": ["module:metro-react-native-babel-preset"] }

package.json

{ "name": "sandboxios", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "react": "16.5.0", "react-native": "0.57.1" }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.47.0", "react-test-renderer": "16.5.0" }, "jest": { "preset": "react-native" } }

screen shot 2018-09-29 at 5 04 35 pm

@nos-joel nos-joel changed the title iOS app bundle failure iOS and Android app bundle failure Sep 29, 2018
@react-native-bot react-native-bot added Platform: iOS iOS applications. Platform: Android Android applications. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. labels Sep 29, 2018
@andraskende
Copy link

andraskende commented Sep 29, 2018

Sane issue here, clean install today:
OSX Mojave 10.14 , Xcode 10.0, node v10.11.0

brew update
brew install watchman
brew install yarn --without-node
https://github.com/creationix/nvm#git-install
npm install -g react-native-cli
react-native init AwesomeProject

This fixed it:
jquense/yup#216
cd AwesomeProject
npm add @babel/runtime

Also #21310

@nos-joel
Copy link
Author

That did the job. I have been stuck the whole day

@DZuz14
Copy link

DZuz14 commented Sep 30, 2018

A good amount of people in #21310 seem to think adding both, "@babel/core" and "@babel/runtime" solve this problem, but just like @andraskende above, "@babel/core" was not needed to get this fixed. The Babel docs also recommend using "@babel/plugin-transform-runtime" alongside this, but in devDependencies section of package.json

@DZuz14
Copy link

DZuz14 commented Sep 30, 2018

Just in case this helps for the people that are fixing this issue, this is the exact timeline/steps it took for me to rectify this issue:

  1. react-native run-ios
  2. Build finishes successfully and metro-bundler-cli and iOS simulator launch.
  3. I am met with the same red screen that @nos-joel has posted above.
  4. Exit metro-bundler-cli, while leaving simulator open with red screen.
  5. npm i --save @babel/runtime. Did this just to get it added to package.json
  6. rm -rf node_modules && npm i && react-native run-ios -- --reset-cache
  7. Good to go, everything works.

I also launched, react-native run-android after seeing the fix worked for ios to see if it worked for both. I can confirm that it fired up with no problems for me in Android Studio.

@gengjiawen
Copy link
Contributor

I have reported to react-native-community/releases#45, hopefully we can have a new release soon.

@facebook facebook locked as resolved and limited conversation to collaborators Sep 30, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

5 participants