question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS main.jsbundle will not create automatically or update without manual react-native bundle

See original GitHub issue

React native is not creating a main.jsbundle for ios automatically. One must manually be created, even though the scheme set as release. The code used to create a bundle manually: react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios

Update this exact issue is happening on android now for us as well during our Jenkins build process. We are able to manually bundle using: react-native bundle --entry-file index.js --platform android --dev false --bundle-output android/main.jsbundle --assets-dest android

No errors occur when this is run, and a bundle is created/updated. From this point forward no bundle updates occur. The following is in Bundle React Native code and images: export NODE_BINARY=node ../node_modules/react-native/scripts/react-native-xcode.sh

Environment

Environment: OS: macOS High Sierra 10.13.3 Node: 8.9.4 Yarn: 1.3.2 npm: 5.7.1 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed) react: ^16.3.0-alpha.1 => 16.3.0-alpha.2 react-native: 0.54.2 => 0.54.2

Steps to Reproduce

I have been experiencing this with an existing project. I even created a new react native project, and opened the xcode project. It shows main.jsbundle as a missing file. I modified the project scheme to Release, and from there -> Build. No main.jsbundle was created in the iOS project folder. One can manually be created with the code above without an error message.

Expected Behavior

A new main.jsbundle would update on build when the following is run: build from xcode OR react-native run-ios --configuration Release

Actual Behavior

No main.jsbundle is created/updated

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:85
  • Comments:71 (4 by maintainers)

github_iconTop GitHub Comments

950reactions
KouSyureicommented, Jul 26, 2018

我只想知道为什么明明需要main.jsbundle文件,框架却不自动生成。。。。。

165reactions
amirpervaiz086commented, Oct 11, 2018

@shinriyo run this command inside project: react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios

Read more comments on GitHub >

github_iconTop Results From Across the Web

main.jsbundle file showing in my iOS project but still throwing ...
jsbundle file with all JS code. After generating main.jsbundle file I tried to run the app again and getting the same error "No...
Read more >
main.jsbundle does not exist [fixed] | by Onexlab - Medium
Open the package.json file and add the following line · Run following command. It will generate main. · Select -> Target → Build...
Read more >
main.jsbundle: No such file or directory issue fixed - YouTube
react native iso main. jsbundle issue fixedmain.jsbundle: No such file or directorymain.jsbundle does not exist. this must be a bug with + ...
Read more >
Manual Configuration for React Native - Sentry Documentation
Learn about manual configuration for iOS and Android. ... reactNative -p ios android (if react-native > 0.60 ), the Gradle files are automatically...
Read more >
Understanding common errors - What is Waldo?
No bundle URL present” If you see this message, it's because you are most ... Typically, the jsbundle file is created automatically by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found