初见

[react-native: command not found

2019-11-25  本文已影响0人  零下十一度

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
上一篇下一篇

猜你喜欢

热点阅读