[react-native: command not found]

react-native init AwesomeProject

[react-native: command not found]

配置reactNative(RN)过程中 出现react-native:command not found.

输入:npm install -g react-native-cli
输出: /usr/local/Cellar/node/6.1.0/libexec/npm/bin/react-native ->/usr/local/Cellar/node/6.1.0/libexec/npm/lib/node_modules/react-native-cli/index.js/usr/local/Cellar/node/6.1.0/libexec/npm/lib └── react-native-cli@0.2.0

我们可以清晰的从底部的输出内容上看到路径 (path) : /usr/local/Cellar/node/6.1.0/libexec/npm/bin/react-native


react-native init appName

cd appName

react-native run-ios```

如果得到错误: ```error: unable to find utility "simctl" ``` at this stage you can reslove using below steps

XCode -> Preferences -> Locations -> Command Line Tools -> Choose Xcode 7.2.1
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容