React Native 0.64 命令 PhaseScriptExecution 失败,退出代码非零

时间:2021-04-20 09:15:07

标签: ios react-native mobile

我正在使用 React Native 0.64 安装一个包含一堆模块的新项目。我可以毫无问题地进行 pod install,但是当我想让我的应用程序运行时(使用 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

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

请注意,我的 node_modules/react-native 中没有“scripts”文件夹(我只有 assets、normalize-color 和 polyfills 文件夹)。我试图删除节点模块并重新安装它。

我的规格是:

iOS Big Sur v. 11.2.3

XCode v.12.3

React Native v.0.64

CocoaPods v. 1.10.1

节点 v. 12.14.1

有什么帮助吗?谢谢。

0 个答案:

没有答案
相关问题