Home Writing Reading

til / Solving PhaseScriptExecution errors in Xcode

PhaseScriptExecution errors can be a semi-regular, and frustrating, occurrence when developing React Native apps with Xcode. Based on my experience, these issues are typically caused by problems with Node. It is common when using Node version managers, like fnm or nvm, since these use directories which aren’t in Xcode’s default search paths.

To fix this, we create a symbolic link (a file that points to another file) for our Node executable and put it in the one of the default paths (/usr/local/bin). $(which node) gets the path of our current Node executable.

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

If you still have errors, check the builds logs to get more information. I find this to be a bit tucked away in Xcode, but hopefully these images will help you get there.

Menu item to see build logs Expand to see build errors
Xcode menu bar item to see build logs Expand build logs in Xcode

  • Loading next post...
  • Loading previous post...