Home > front end >  Command PhaseScriptExecution failed with a nonzero exit code.PhaseScriptExecution [CP-User]
Command PhaseScriptExecution failed with a nonzero exit code.PhaseScriptExecution [CP-User]

Time:01-24

This is a react native project. After pod install, execute yarn ios and get the following error:

    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)

However, when using sudo yarn ios, it can work normally. I don't understand why?

CodePudding user response:

I try to "nvm unalias default". It worked. Ref: https://github.com/react-native-community/upgrade-support/issues/161

CodePudding user response:

This is because of the node version you are using, Using the current lts version will work for react native 0.67 version.

  •  Tags:  
  • Related