Closed
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
React Native Environment Info:
System:
OS: Linux 4.19 Fedora 29 (Twenty Nine) 29 (Twenty Nine)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 3.14 GB / 15.55 GB
Shell: 4.4.23 - /bin/bash
Binaries:
Node: 11.4.0 - ~/.local/share/virtualenvs/luko-app-react-native-wkPbUArk/bin/node
npm: 6.5.0 - ~/.local/share/virtualenvs/luko-app-react-native-wkPbUArk/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-27 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
npmPackages:
react: ^16.6.3 => 16.7.0
react-native: ^0.57.8 => 0.57.8
Description
In https://github.com/facebook/react-native/blob/master/scripts/packager.sh
node is called directly, without using the one defined by NODE_BINARY
variable
So, when using other alternatives than nvm or nodenv (I use nodeenv, but in a pipenv python virtualenv, to be fully isolated from the system), XCode fail, telling node is not found
Reproducible Demo
To setup a virtualenv as I did :
Install python pipenv tool at user level:
pip install -u pipenv
Then setup a virtualenv and activate node
cd my_src_directory
pipenv --python 3
pipenv shell
pipenv install --dev nodeenv
nodeenv -p
Setup the react-native stack
npm install
Retrieve the virtualenv path
pipenv --venv
Configure xcode shell script for react native building with NODE_BINARY using the virtualenv path (+ bin/ subdirectory) then try to build => Error