Search code examples
react-nativexcode15macos-sonoma

Getting React Native XCode 15.4 and macOS Sonoma 14.5 build error “Command PhaseScriptExecution failed with a nonzero exit code”


I tried different ways to solve this error using various approaches. In this case, you can’t downgrade your code version because it is not compatible with the latest macOS.

I tried removing node_modules and reinstalling them, installing pods, restarting the laptop, and upgrading all package managers like CocoaPods. I also created new projects and tried everything, but nothing worked.

enter image description here

How can I solve this?


Solution

  • To resolve this, simply remove any spaces in your project folder and the parent folder. Spaces in folder names can cause issues with various tools and scripts, leading to errors. Renaming these folders to remove spaces can help avoid such problems.