Phaswa Tiyasi
Phaswa Tiyasi

Reputation: 1

React Native: Command PhaseScriptExecution failed with a nonzero exit code

So, I just created a new React Native using react-native init projectName, then I got an error of type cli is not a function and whatnot. So I used react-native init projectName --version 0.68.2, and successfully managed to create a new project

On Android it runs perfectly, but iOS it's giving me the Command PhaseScriptExecution failed with a nonzero exit codeenter image description here

So I tried sudo get install cocoapods,

cd ios && rm -rf build/ cd .. $$ pod install

Upvotes: 0

Views: 2081

Answers (1)

Juanma
Juanma

Reputation: 686

I came across with the same problem, what worked for me was:

  1. Create ios/.xcode.env.local file.
  2. Add this line:
export NODE_BINARY=/Users/myuser/.nvm/versions/node/v20.16.0/bin/node

Note: You can find your NODE_BINARY by running this command:

whereis node

Upvotes: 0

Related Questions