命令 PhaseScriptExecution 因非零退出而失败 code.PhaseScriptExecution [CP-User]
Command PhaseScriptExecution failed with a nonzero exit code.PhaseScriptExecution [CP-User]
这是一个 react native
项目。
pod install
后,执行yarn ios
,出现如下错误:
export VERSION_INFO_BUILDER\=link
export VERSION_INFO_FILE\=FBReactNativeSpec_vers.c
export VERSION_INFO_STRING\=\"@\(\#\)PROGRAM:FBReactNativeSpec\ \ PROJECT:Pods-\"
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES\=NO
export XCODE_APP_SUPPORT_DIR\=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION\=13C100
export XCODE_VERSION_ACTUAL\=1321
export XCODE_VERSION_MAJOR\=1300
export XCODE_VERSION_MINOR\=1320
export XPCSERVICES_FOLDER_PATH\=/XPCServices
export YACC\=yacc
export arch\=undefined_arch
export variant\=normal
/bin/sh -c /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh
Command PhaseScriptExecution failed with a nonzero exit code
objc[28114]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x211582b90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1041e42c8). One of the two will be used. Which one is undefined.
objc[28114]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x211582be0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1041e4318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
但是在使用sudo yarn ios
的时候可以正常使用。我不明白为什么?
我尝试“nvm unalias default”。有效。参考:https://github.com/react-native-community/upgrade-support/issues/161
这是因为您使用的节点版本,使用当前
lts 版本适用于 react native 0.67
版本。
这是一个 react native
项目。
pod install
后,执行yarn ios
,出现如下错误:
export VERSION_INFO_BUILDER\=link
export VERSION_INFO_FILE\=FBReactNativeSpec_vers.c
export VERSION_INFO_STRING\=\"@\(\#\)PROGRAM:FBReactNativeSpec\ \ PROJECT:Pods-\"
export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES\=NO
export XCODE_APP_SUPPORT_DIR\=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION\=13C100
export XCODE_VERSION_ACTUAL\=1321
export XCODE_VERSION_MAJOR\=1300
export XCODE_VERSION_MINOR\=1320
export XPCSERVICES_FOLDER_PATH\=/XPCServices
export YACC\=yacc
export arch\=undefined_arch
export variant\=normal
/bin/sh -c /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh
Command PhaseScriptExecution failed with a nonzero exit code
objc[28114]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x211582b90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1041e42c8). One of the two will be used. Which one is undefined.
objc[28114]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x211582be0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1041e4318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)
但是在使用sudo yarn ios
的时候可以正常使用。我不明白为什么?
我尝试“nvm unalias default”。有效。参考:https://github.com/react-native-community/upgrade-support/issues/161
这是因为您使用的节点版本,使用当前
lts 版本适用于 react native 0.67
版本。