【问题标题】:react-native init causing build fail out of boxreact-native init 导致构建失败开箱即用
【发布时间】:2015-11-09 15:19:23
【问题描述】:

使用react-native init <projectName>,然后使用npm install 会导致构建失败并出现错误:

Command /bin/sh failed with exit code 127

和消息:

 ../node_modules/react-native/packager/react-native-xcode.sh: line 36: react-native: command not found
Command /bin/sh failed with exit code 127

在本地和全局都安装了 react-native 无济于事。

有没有人遇到过这个问题并知道如何解决?

【问题讨论】:

标签: ios node.js xcode react-native


【解决方案1】:

此处解释的 hack 有效: https://github.com/facebook/react-native/issues/3948

添加source ~/.bash_profilereact-native-xcode.sh开头

显然,已在 0.16.0-rc 中修复! https://github.com/facebook/react-native/commit/9a64f17de84e50a4fc60f1b96168aa61925934a8

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-13
    • 1970-01-01
    • 2018-01-07
    • 1970-01-01
    • 1970-01-01
    • 2018-03-08
    • 2019-03-21
    • 2019-06-06
    相关资源
    最近更新 更多