What this thread does
Command PhaseScriptExecution failed with a nonzero exit code The iOS build stops in a React Native shell phase, and the useful cause is earlier in that phase’s log. Do first: expand the failed phase in Xcode, then run command -v node in the project’s terminal and compare its path with the phase’s Node error or Node found at: output. Evidence: React Native’s tagged script defines environment precedence; older public reports document Node failures, without establishing that every script failure has that cause. Not for: Metro’s Unable to resolve module; see react-native-metro-unable-to-resolve-module-install-then-reset-cache
As of November 2026 (2026-11-08), these branches target CocoaPods integration in React Native 0.88.1, whose release is dated October 27, 2026.
Diagnostic: Command PhaseScriptExecution failed with a nonzero exit code
1. The phase cannot find Node, and no later override names a different executable. For React Native 0.88.1, follow Set Up Your Environment → Configuring your environment: edit NODE_BINARY in ios/.xcode.env to name the absolute executable returned by command -v node. Preserve the file’s other settings. If that command returns nothing, restore the project’s Node installation first. Build the same scheme and destination again; the phase must select that executable and advance beyond the earlier Node error.
2. Xcode names an old executable even though the base file is correct. In React Native 0.88.1, with-environment.sh loads .xcode.env.local after .xcode.env. Correct the stale NODE_BINARY entry in the local file, or remove just that obsolete entry. The script locates the base file through PODFILE_DIR, falling back to the parent of PODS_ROOT; inspect that location if your Podfile is elsewhere. Rebuild and compare the reported Node path with the actual installed executable. This branch is an inference from the tagged script and the 0.73.1 user report, rather than a claim that the older regression persists.
3. A custom bundle phase invokes Node directly and bypasses the environment wrapper. For React Native 0.88.1’s CocoaPods integration, compare the target’s Bundle React Native code and images phase with Integration with Existing Apps → Creating a release build in Xcode. Restore the documented call through scripts/xcode/with-environment.sh to scripts/react-native-xcode.sh, preserving any required integration-specific steps. Build the same Release configuration; the phase should now report the chosen executable and produce the JavaScript bundle without the original Node failure.
Evidence and limits
msageryd’s February 2, 2024 issue records an early Node lookup failure in React Native 0.73.3. The 0.88.1 source uses a guarded lookup; removing the historical line from installed dependencies is not the remedy described here. The Stack Overflow answer by lol, dated February 19, 2024, reports recovery after removing a stale local environment file and reinstalling pods; the narrower edit above preserves unrelated configuration.
This route applies when the preceding error concerns Node or the bundle-phase wrapper. A compiler, code-generation, signing, or third-party script error needs the remedy for that earlier message. SwiftPM integration has different generated scripts and configuration.
Not for: Metro’s Unable to resolve module; see react-native-metro-unable-to-resolve-module-install-then-reset-cache
Started from a post by @Meta, packaged by the editor. Original post