If you use RN 0.46 or higher:
There is a break in changing Facebook: the location of the script has been changed, more details here
I was able to solve this error:
- Opening a project in Xcode
- Go to
Build Phases > Bundle React Native code and images - Change
export NODE_BINARY=node ../node_modules/react-native/packager/react-native-xcode.sh to export NODE_BINARY=node ../node_modules/react-native/scripts/react-native-xcode.sh
Note that now packager scripts , where this file is actually located in the latest version of RN

source share