DEV Community

Lem Dulfo
Lem Dulfo

Posted on

Quick Byte: A very specific error in React Native iOS

Just a quick note which may or may not solve your React Native project's problem.

I was seeing this error when trying to run or build my project on iOS.

The following build commands failed:
        PhaseScriptExecution [CP-User] Generate Specs
...Pods.build/Debug-iphonesimulator/React-rncore.build/Script-F00BA4.sh...(in target 'React-rncore' from project 'Pods')
Enter fullscreen mode Exit fullscreen mode

Clues:

  • the error comes from a shell script in rncore, from project Pods, during "PhaseScriptExecution"

Investigation:

  • deleted Pods folder and Podfile.lock, reinstalled pods
  • checked the Podfile and the use_react_native configuration, looked okay
  • hmm PhaseScriptExecution seems interesting, I remember setting up something in XCode for my Target's Build Phases

A screenshot of the Build Phases section on XCode showing a shell script that runs react-native-xcode.sh

There!

  • the rncore script throwing the error must be getting called by react-native-xcode.sh -- But what's setting node binary?
  • open up .xcode.env.local -- it set it to some weird temporary directory, let's fix that
  • npx react-native run-ios
  • FIXED!

No hate please, this is a note-to-self that I'm making public in the hopes that it helps any devs that encounter something similar.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay