我正在安装一个带有React Native 0.64模块的新项目。我可以毫无问题地进行pod 安装,但是当我想让我的应用程序运行时(使用 react-native run-ios 或使用 XCode)在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
Run Code Online (Sandbox Code Playgroud)
这是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
Run Code Online (Sandbox Code Playgroud)
请注意,我的node_modules/react-native 中没有“ scripts ”文件夹(我只有 assets、normalize-color 和 polyfills 文件夹)。我试图删除节点模块并重新安装它。
我的规格是:
iOS Big Sur v. 11.2.3
XCode v.12.3 …