React Native Build命令失败:PhaseScriptExecution ...(domain = NSPOSIXErrorDomain,code = 2) [英] React Native Build Commands Failed: PhaseScriptExecution ... (domain=NSPOSIXErrorDomain, code=2)

查看:197
本文介绍了React Native Build命令失败:PhaseScriptExecution ...(domain = NSPOSIXErrorDomain,code = 2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

环境

  Mac OS X版本10.11.3(15D21)
Xcode版本7.2(7C68)
模拟器版本9.2(SimulatorApp-643)
react-native-cli 0.1.10
节点v5.5.0

在运行应用程序之前我做了什么

  npm install -g react-native-cli 
react-native init DemoProjectDELETEME
cd ./DemoProjectDELETEME
react-native run-ios

我是 React Native 的新手。当我尝试在iOS模拟器上运行默认应用程序时,我收到以下错误。我发现了类似的问题,但它并没有解决我的问题。



$项目根目录中的b
$ b

sudo npm start 解决了这个问题,但 react-native run-ios 建立失败



感谢您抽出时间查看我的问题。

解决方案

尝试运行 react-native upgrade



请参阅Github线程: https://github.com/facebook/react-native/issues/7308#issuecomment-219597774


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.0

What I did before running the app

npm install -g react-native-cli
react-native init DemoProjectDELETEME
cd ./DemoProjectDELETEME
react-native run-ios

I am new to React Native. When I try to run the default app on iOS simulator I got the following errors. I found a similar issue but it does not solve my problem.

Xcode6 can't run any app in simulator ( Domain = NSPOSIXErrorDomain, Code = 3 )

After restart the machine and simulator the issues still persistent.

** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Run\ Script /Users/x/Desktop/DemoProjectDELETEME/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/DemoProjectDELETEME.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
/Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/done.js:10
      throw err;
      ^

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/DemoProjectDELETEME.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:464:13)
    at Object.execFileSync (child_process.js:484:13)
    at _runIOS (runIOS.js:77:34)
    at runIOS.js:24:5
    at tryCallTwo (/Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/core.js:45:5)
    at doResolve (/Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/core.js:200:13)
    at new Promise (/Users/x/Desktop/DemoProjectDELETEME/node_modules/promise/lib/core.js:66:3)
    at Array.runIOS (runIOS.js:23:10)
    at Object.run (/Users/x/Desktop/DemoProjectDELETEME/node_modules/react-native/local-cli/cli.js:86:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:73:7)

Got the follower error when I am trying to launch the app from Xcode.

sudo npm start in project root solves the issue, but react-native run-ios still BUILD FAILED.

Thanks for your time viewing my question.

解决方案

Try running react-native upgrade

See Github thread: https://github.com/facebook/react-native/issues/7308#issuecomment-219597774

这篇关于React Native Build命令失败:PhaseScriptExecution ...(domain = NSPOSIXErrorDomain,code = 2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆