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

Can't add node args when we bundle code and images to iOS app #22421

Closed
3 tasks done
Kuchitama opened this issue Nov 27, 2018 · 5 comments
Closed
3 tasks done

Can't add node args when we bundle code and images to iOS app #22421

Kuchitama opened this issue Nov 27, 2018 · 5 comments
Labels
Component: Image 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

@Kuchitama
Copy link
Contributor

Environment

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
Memory: 802.13 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.11.0 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 22, 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.2, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 27.0.2, 27.0.3, 28.0.0, 28.0.3
System Images: android-24 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.1 => 16.6.1
react-native: 0.57.5 => 0.57.5
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

Description

I can't build an iOS app with node args, like --max_old_space_size.
By modification of ce25c54, we can't add node args to NODE_BINARY.

When I build app, I get an error with below message.

error: Can't find 'node --max_old_space_size=8192' binary to build React Native bundle

Reproducible Demo

Open Bundle React Native code and images of Build Phases by XCode.
Modify like below.

export NODE_BINARY=node\ --max_old_space_size=8192
../node_modules/react-native/scripts/react-native-xcode.sh

Then start building the app.

@jrounsav
Copy link

On 0.57.8 and am now seeing this same error.
Comment on above commit says the same

Removed attributes to get around for now

@Kuchitama
Copy link
Contributor Author

@jrounsav Yes. Unfortunately, my patch(#22423) is not included in 0.57.8, 0.58.0 and maybe 0.58.1.

@sgreco611
Copy link

Has this issue been included in a release? I cannot seem to find which one if so.

@Kuchitama
Copy link
Contributor Author

@sgreco611 This fix will be included in 0.59.0.
https://github.com/facebook/react-native/blob/0.59-stable/scripts/react-native-xcode.sh#L121

@CalderBot
Copy link

Note: from what is in 0.59.0.react-native-xcode.sh, the syntax will be:

export NODE_BINARY=node
export NODE_ARGS='--max_old_space_size=8192'
../node_modules/react-native/scripts/react-native-xcode.sh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: Image 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

Successfully merging a pull request may close this issue.

5 participants