Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
find-node.sh supports Homebrew on M1 (#31622)
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes #31621 #31592 ## Changelog [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: #31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
- Loading branch information