Xcode 14.3.1 Command PhaseScriptExecution failed with a nonzero exit code

349 views Asked by At

Getting this error while archive ios app

Command PhaseScriptExecution failed with a nonzero exit code

I tried all solution on internet

How do I resolve "Command PhaseScriptExecution failed with a nonzero exit code" error when trying to archive project.

2

There are 2 answers

0
Tushar Chaudhari On

I found this solution working for me:

Step 1: Open xcode and search for the following line

source="$(readlink "${source}")" The file directory would be : ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh

Step 2: Replace the searched line in the code with -f

Before

source="$(readlink "${source}")" Change this to:

source="$(readlink -f "${source}")"

0
Mitesh devganiya On

Please make sure your node path is right

check file

.xcode.env.local

if this file is not existing in you ios folder so create file and write

export NODE_BINARY="/opt/homebrew/Cellar/node@20/20.11.0/bin/node"

write you node path and enter image description here