Search code examples
iosnode.jsreact-nativebuild

React Native ios build : Can't find node


I have a prototype ready to go and the project is jammed with build:

error: Can't find 'node' binary to build React Native bundle If you have non-standard nodejs installation, select your project in Xcode, find 'Build Phases' - 'Bundle React Native code and images' and change NODE_BINARY to absolute path to your node executable (you can find it by invoking 'which node' in the terminal)

this feedback is helpless for me, i do have node with nvm. is this something related to bash?


Solution

  • 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