title: Xcode 13 build error - Command PhaseScriptExecution failed with a nonzero exit code
body: <p>Cannot build with xcode 13, I keep getting this error.</p>
  <p>I have tried everything from this thread but nothing works, <a href="https://github.com/react-native-community/upgrade-support/issues/161" rel="nofollow noreferrer">https://github.com/react-native-community/upgrade-support/issues/161</a></p>
  <p>I've nuked the repo pulled down again and still get the same error. I'm out of ideas, can anyone please help?</p>
  <pre><code>    /bin/sh -c /Users/xxx/Library/Developer/Xcode/DerivedData/xxx-glxuojrfejxbhqgircpjgklctbto/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-85ABEEFECFDEC6A1611D2CF5A77EABBC.sh
  
  /Users/xxx/apps/xxx/node_modules/react-native/scripts/generate-specs.sh: line 27: readlink: command not found
  /Users/xxx/apps/xxx/node_modules/react-native/scripts/generate-specs.sh: line 27: dirname: command not found
  /Users/xxx/apps/xxx/node_modules/react-native/scripts/generate-specs.sh: line 27: cd: : No such file or directory
  Command PhaseScriptExecution failed with a nonzero exit code
  </code></pre>
  <p>Using xcode 13, RN 64.2, macOS Big Sur 11.6</p>