Skip to content

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

@nickmccally

Description

@nickmccally

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions