react-native init导致构建失败

时间:2015-11-09 15:19:24

标签: ios node.js xcode react-native

使用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,并且全局无效。

是否有人遇到此问题并知道如何解决?

1 个答案:

答案 0 :(得分:0)

这里解释的黑客有效: https://github.com/facebook/react-native/issues/3948

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

的开头

显然已修复0.16.0-rchttps://github.com/facebook/react-native/commit/9a64f17de84e50a4fc60f1b96168aa61925934a8