React 本机 Ignite ios 构建失败,命令 PhaseScriptExecution 失败并出现非零退出代码

问题描述 投票:0回答:1

两天以来,我一直在尝试运行一个使用 Ignite 样板构建的现有项目,Android 版本工作正常,但我无法构建 ios。首先,存在与 unary_function 相关的错误,修复该错误后,我在 XCode 中遇到新错误“Command PhaseScriptExecution failed with a nonzero exit code”。

    ...
address/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99. (in target 'react-native-safe-area-context' from project 'Pods')
    warning: Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
    
    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS Simulator, id:9251DE04-CE06-4D88-95C7-5AABCCF008BE, OS:17.2, name:iPhone 15 Plus }
    { platform:iOS Simulator, id:9251DE04-CE06-4D88-95C7-5AABCCF008BE, OS:17.2, name:iPhone 15 Plus }
    ** BUILD FAILED **
    
    
    The following build commands failed:
            PhaseScriptExecution [CP-User]\ Generate\ app.config\ for\ prebuilt\ Constants.manifest /Users/name/Library/Developer/Xcode/DerivedData/guardian-anwhhkyjhbavobalirikdkvqliqv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/EXConstants.build/Script-46EB2E00024160.sh (in target 'EXConstants' from project 'Pods')
    (1 failure)
    
    info Run CLI with --verbose flag for more details.
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我已经尝试了很多有关 ignite 问题和 Stack 上其他问题的建议,但没有一个有效。

XCode: 15.1
react: 18.2.0
react-native: 0.71.7
Node: v18.12.1
yarn: 1.22.19
npm: 9.8.1

没用: https://github.com/expo/expo/issues/15809 Xcode 构建上的 react-native-config 的 PhaseScriptExecution 失败 ...

ios react-native ignite
1个回答
0
投票

我更新了所有内容,例如 nvm rvm node ruby 等,但没有帮助。然后我删除了 bash_profile 中的注释,但没有帮助,但是,下次我删除了 bash_profile 中的所有内容时,现在有一个空的 bash_profile,现在它可以在 iOS 上运行。但问题是现在我在运行 Android 时遇到了问题。需要帮助

我有一台 MacBook m1 pro

错误是

warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
error Failed to start the app.
Error: spawnSync adb ENOENT
    at Object.spawnSync (node:internal/child_process:1124:20)
    at Object.spawnSync (node:child_process:876:24)
    at module.exports.sync (/node_modules/execa/index.js:334:30)
    at tryLaunchAppOnDevice (/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/tryLaunchAppOnDevice.js:46:22)
    at node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:95:39
    at Array.forEach (<anonymous>)
    at runOnAllDevices (/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:90:48)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.handleAction (/node_modules/@react-native-community/cli/build/index.js:108:9)
© www.soinside.com 2019 - 2024. All rights reserved.