React Native ios build : Can't find node
I found one
solution
First find your current node, in shell
which node
then copy your node url to
export NODE_BINARY=[your node path]
../node_modules/react-native/packager/react-native-xcode.sh to node_modules/react-native/scripts/react-native-xcode.sh
New RN project in M1 mbp built failed. Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable.
sudo ln -s $(which node) /usr/local/bin/node
It resolved.
i am having issues with react-native ios build - Expected a type error in one of Library
Try following way to resolve this issue
Go to Finder
-> Applications
Right click on Xcode
app and click on Get Info
You'll see this window
Make sure Open using Rosetta
is checked. If now mark it checked and close.
Restart your Xcode, clean build folder and build again.
Hope it resolves the issue!
Setup of React Native using ndenv on OS X
This issue was effectively fixed when facebook/react-native#5518 landed. react-native-xcode.sh
now respects a NODE_BINARY environment variable that tells it where to find node
on the build system. Under your app's target, see Build Phases > Bundle React Native code and images and set the shell script code to:
export NODE_BINARY=$HOME/.ndenv/shims/node
../node_modules/react-native/packager/react-native-xcode.sh
If your node
is in a different location, change the value of NODE_BINARY to suit your installation. Here's a screencap from Xcode 7.1 to aid navigation:
PhaseScriptExecution error in React Native app
I have figured out a solution, if you're using nvm
make sure you don't have another globally installed version of Node/npm.
If you aren't sure whether or not you have a global version, go to your bash_profile/zshrc and comment the three nvm
initialization lines (export NVM_DIR="$HOME/.nvm" [...]
), then open a new terminal and do node --version
, if it still finds something it means that you have a global version somewhere, and you can find its path with which node
.
In my case I'm using Homebrew, and I had a global version of Node that I wasn't even aware coming from the yarn
formula, I discovered it after running brew uses --installed node
. I went ahead and uninstalled yarn using brew uninstall --force yarn
, which automatically uninstalled its node/npm dependency, then uncommented the nvm
initialization lines, and then I reinstalled yarn
using nvm's npm with npm i -g yarn
, and now everything works.
Related Topics
How to Check If iOS App Is in Background
How to Change the Size of Uiactivityindicator
How to Filter Nsarray Using Predicate on an Object Property
Spacing Between Uitableviewcells
How to Delete Derived Data and Clean Project in Xcode 5 and Later
How to Draw a Line in Sprite-Kit
Mapkit iOS 9 Detailcalloutaccessoryview Usage
Change the Uitextview Text Direction
How Secure Is Nsuserdefaults on iOS 8,9
How to Detect Live Changes on Textfield in Swiftui
Objc_Sync_Enter/Objc_Sync_Exit Not Working with Dispatch_Queue_Priority_Low
Swift - Instantiating a Navigation Controller Without Storyboards in App Delegate
Still Not Optimized for iPhone 6 and iPhone 6 Plus
Libmobilegestalt Mobilegestaltsupport.M:153 Mobilegestalt.C:550 Xcode Console
Swift "Bridging-Header.H" File Not Allowing Me to Instantiate Objective-C Classes in .Swift Files