React Native Build Commands Failed: PhaseScriptExecution … (domain=NSPOSIXErrorDomain, code=2)

前端 未结 14 2464
旧巷少年郎
旧巷少年郎 2021-02-12 09:45

Environment

Mac OS X Version 10.11.3 (15D21)
Xcode Version 7.2 (7C68)
Simulator Version 9.2 (SimulatorApp-643)
react-native-cli 0.1.10
node v5.5         


        
14条回答
  •  野性不改
    2021-02-12 10:20

    Edit the file ,ProjectName/node_modules/react-native/local-cli/runIOS/runIOS.js Line no 18 : replace the entire line of code with the following :

    return `build/Build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app`;
    

    Line no: 146: uncomment '-derivedDataPath', 'build',

    after that run the command from the terminal: sudo react-native run-ios

提交回复
热议问题