Skip to content

packager.sh seems to not find node binary when using NODE_BINARY variable #22868

Closed
@Nabellaleen

Description

@Nabellaleen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugGood first issueInterested in collaborating? Take a stab at fixing one of these issues.Platform: LinuxBuilding on Linux.Priority: LowResolution: LockedThis issue was locked by the bot.Tech: Bundler 📦This issue is related to the bundler (Metro, Haul, etc) used.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions