Skip to content

Bundling for Android release fails when assigning to process.env.NODE_ENV #7607

@andrewtoth

Description

@andrewtoth

Using 26.0-rc or as far back as 23.0, adding the following line to a project causes the Android release process to fail, but not debug:

process.env.NODE_ENV = 'development';

Running the following causes it to fail:

node node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --reset-cache true --entry-file index.android.js --bundle-output /Users/<user>/Workspace/<projectDir>/android/app/build/intermediates/assets/release/index.android.bundle --assets-dest /Users/<user>/Workspace/<projectDir>/android/app/build/intermediates/res/merged/release

but the following will succeed (--dev true):

node node_modules/react-native/local-cli/cli.js bundle --platform android --dev true --reset-cache true --entry-file index.android.js --bundle-output /Users/<user>/Workspace/<projectDir>/android/app/build/intermediates/assets/release/index.android.bundle --assets-dest /Users/<user>/Workspace/<projectDir>/android/app/build/intermediates/res/merged/release

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions