I'm installing a new project with a bunch of modules with React Native 0.64. I can do a pod install without troubles, but when I want to make my app running (with react-native run-ios or with XCode) this error occured on XCode :
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: readlink: command not found
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: dirname: command not found
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: cd: : No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
This one on react-native run-ios :
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/thomas/Library/Developer/Xcode/DerivedData/appname-aqbmfgqjkshyqmaprdvggqaeqjrp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/**FBReactNativeSpec**.build/Script-A319AA7F2B7AAE771AE63D66A0049241.sh
Note that I don't have a 'scripts' folder in my node_modules/react-native (I just have assets, normalize-color and polyfills folders). I've tried to remove node-modules and reinstall it.
My specs are :
iOS Big Sur v. 11.2.3
XCode v.12.3
React Native v.0.64
CocoaPods v. 1.10.1
Node v. 12.14.1
Any help ? Thanks.
ReactNativeCodeGen takes a flowtype type definition of the props a React Native component expects and generates java and swift code to marshall the data, including functions and structs. The resulting class is then usable within the context of a typical iOS or Android app.
The above answer is correct but in that case, you are editing the inside the node modules. So rather than just enter this command in your terminal
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
I found the solution after hours of debugging you need to modify this file for now.
/node_modules/react-native/React/FBReactNativeSpec/../../scripts/generate-specs.sh
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
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