question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command PhaseScriptExecution failed with a nonzero exit code

See original GitHub issue

Description

I followed the instructions from https://reactnative.dev/docs/environment-setup

npx react-native init AwesomeProject npm install then cd to ios directory and run pod install then opened the project with Xcode and trigged build. But the build failed and the error is Command PhaseScriptExecution failed with a nonzero exit code The project could run properly via the command npx react-native run-ios, but could not be built on Xcode, I tried on two different Macbook and got the same error.

Version

0.67.1

Output of npx react-native info

System: OS: macOS 11.6.2 CPU: (8) x64 Intel® Core™ i7-4770HQ CPU @ 2.20GHz Memory: 126.16 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node Yarn: 1.22.15 - /opt/local/bin/yarn npm: 6.14.15 - ~/.nvm/versions/node/v14.18.3/bin/npm Watchman: 2022.01.24.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7784292 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 11.0.13 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.1 => 0.67.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

npx react-native init AwesomeProject npm install then cd to ios directory and run pod install then opened the project with Xcode and trigged build

Snack, code example, screenshot, or link to a repository

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:33
  • Comments:33

github_iconTop GitHub Comments

89reactions
krlolcommented, Feb 3, 2022

Cleaning the project and re-running worked for me

46reactions
ksealeycommented, Apr 7, 2022

If you’re getting this with an error about setting the node path, this should fix it.

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 11 Command PhaseScriptExecut… - Apple Developer
When compiling, I keep getting this error: Command PhaseScriptExecution failed with a nonzero exit code. I tried in Xcode. Xcode > Preferences >...
Read more >
How to Fix Xcode Command PhaseScriptExecution failed with ...
The Xcode 11 “Command PhaseScriptExecution failed with a nonzero exit code” error message can be concerning for developers.
Read more >
Xcode 10.2.1 Command PhaseScriptExecution failed with a ...
How do I resolve " Command PhaseScriptExecution failed with a nonzero exit code " error when trying to archive project. And I am...
Read more >
Command PhaseScriptExecution failed with a nonzero exit code
Description Trying to load a public react-native project: https://github.com/dramsay9/reactnative-attentionapp and got the below error in ...
Read more >
Command PhaseScriptExecution failed with a nonzero exit code
Hello there, I have been struggling with configuring Apollo for a while now and can't solve the problem. I am currently stuck in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found