美文网首页初见
[react-native: command not found

[react-native: command not found

作者: 零下十一度 | 来源:发表于2019-11-25 17:33 被阅读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
    

    相关文章

      网友评论

        本文标题:[react-native: command not found

        本文链接:https://www.haomeiwen.com/subject/tifaictx.html