admin管理员组文章数量:1335617
I am using macOS Sequoia 15.1.0 with Xcode 16.1 to run a React Native iOS app. However, when I attempt to build the app, I encounter the following error:
Command PhaseScriptExecution failed with a nonzero exit code.
This issue occurs not only with my existing project but also with a newly created React Native project.
What I Have Tried: I have spent the past two weeks trying various solutions from Stack Overflow and GitHub discussions, but none have resolved the problem. Here are the steps I have already tried:
Reinstalled Xcode and ensured it is updated to version 16.1. Updated CocoaPods to the latest version (pod --version outputs 1.16.2). Cleared the derived data using xcodebuild clean and removed the DerivedData folder. Installed dependencies again with pod install in the ios directory. Attempted to run the app directly via Xcode instead of the CLI. Verified that Homebrew is updated (brew --version outputs 4.4.5). Tried running react-native run-ios with a freshly created project. Despite these efforts, the issue persists, and I am unable to proceed with my development.
Environment Details: macOS Version: Sequoia 15.1.0 Xcode Version: 16.1 CocoaPods Version: 1.16.2 Homebrew Version: 4.4.5 React Native Version: (Specify the version here, e.g., 0.72.x)
I am using macOS Sequoia 15.1.0 with Xcode 16.1 to run a React Native iOS app. However, when I attempt to build the app, I encounter the following error:
Command PhaseScriptExecution failed with a nonzero exit code.
This issue occurs not only with my existing project but also with a newly created React Native project.
What I Have Tried: I have spent the past two weeks trying various solutions from Stack Overflow and GitHub discussions, but none have resolved the problem. Here are the steps I have already tried:
Reinstalled Xcode and ensured it is updated to version 16.1. Updated CocoaPods to the latest version (pod --version outputs 1.16.2). Cleared the derived data using xcodebuild clean and removed the DerivedData folder. Installed dependencies again with pod install in the ios directory. Attempted to run the app directly via Xcode instead of the CLI. Verified that Homebrew is updated (brew --version outputs 4.4.5). Tried running react-native run-ios with a freshly created project. Despite these efforts, the issue persists, and I am unable to proceed with my development.
Environment Details: macOS Version: Sequoia 15.1.0 Xcode Version: 16.1 CocoaPods Version: 1.16.2 Homebrew Version: 4.4.5 React Native Version: (Specify the version here, e.g., 0.72.x)
Share Improve this question asked Nov 19, 2024 at 23:07 Muhammad AkbarMuhammad Akbar 211 silver badge1 bronze badge1 Answer
Reset to default 0The issue you're facing might be related to the NODE_BINARY path in your Xcode configuration. I've encountered this problem before, and here's how I resolved it:
- Verify the
NODE_BINARY
Path Run the following command in your terminal to find the correct path to your Node.js binary:
which node
- Check and Update
.xcode.env.local
The.xcode.env.local
file might be hidden in Xcode. To reveal hidden files, pressCommand + Shift + . (dot)
in Finder. Locate the file and open it.
If the NODE_BINARY
path in .xcode.env.local
doesn't match the path from the terminal, update it to the correct path you just copied.
- Clean Build Folder
After updating the NODE_BINARY
path, clean your build folder to ensure there are no residual errors:
In Xcode, go to Product > Clean Build Folder (Shift + Command + K
).
- Rebuild the Project
本文标签:
版权声明:本文标题:xcode - React Native iOS Build Error: 'Command PhaseScriptExecution failed with a nonzero exit code' on macOS Se 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742392126a2466196.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论