React Native ios build : Can't find node React Native ios build : Can't find node ios ios

React Native ios build : Can't find node


@brunocascio solution on the comment is simpler and less invasive, create a symlink to node, on command line:

ln -s $(which node) /usr/local/bin/node

Update:

On new M1 Mac I had to cd /usr/local then mkdir bin (or just sudo mkdir /usr/local/bin) first.

thanks leo for the comment


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

enter image description here


Solution for nvm users :

In your build phases scripts, just add

# Fix for machines using nvmif [[ -s "$HOME/.nvm/nvm.sh" ]]; then. "$HOME/.nvm/nvm.sh"elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then. "$(brew --prefix nvm)/nvm.sh"fi

Above export NODE_BINARY=node. This will make Xcode work regardless of your machine using nvm.


matomo