I'm using M1 chip and xCode 13.4.1. I get the following React Native error while executing the app in the simulator:
The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/Ibra/Library/Developer/Xcode/DerivedData/Mario-girhlsdkqiibhqhflwlyrybpo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E110.sh (in target 'FBReactNativeSpec' from project 'Pods') (1 failure)
The problem persists even when I start a brand-new React Native project and try to execute it on iOS. What led to the error and how can it be fixed?
Thank you
Solution: It's node version mismatch version.
During the initial execution of 'pod install,' a file named '.xcode.env.local' was automatically generated in the '/ios' directory. This file contained the line
'$NODE_BINARY=/opt/homebrew/Cellar/node/20.8.0/bin/node.'
To know the exact path of Node I typed "which node" whatever you get just paste that path inside '.xcode.env.local' file.
I resolved the problem by updating this line only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With