gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 00:23:01 24 4
gpt4 key购买 nike

我正在安装一个带有 的模块的新项目。 react 原生 0.64 .我可以做一个 pods 安装 没有麻烦,但是当我想让我的应用程序运行(使用 react-native run-ios 或 XCode)时,此错误发生在 X码 :

/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 (我只有 assets、normalize-color 和 polyfills 文件夹)。我试图删除节点模块并重新安装它。
我的规范是:
iOS大苏尔诉 11.2.3
X码 v.12.3
react 原生 v.0.64
cocoa bean 诉 1.10.1
节点 诉 12.14.1
有什么帮助吗?谢谢。

最佳答案

经过数小时的调试后,我找到了解决方案,您现在需要修改此文件。

  • 编辑此文件 /node_modules/react-native/React/FBReactNativeSpec/../../scripts/generate-specs.sh
  • 添加此行 export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
  • 然后使用 运行项目Xcode 它将工作 100%
  • 关于ios - React Native 0.64 命令 PhaseScriptExecution 失败,退出代码非零,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67175939/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com