美文网首页
mac os react-native guide

mac os react-native guide

作者: wenki | 来源:发表于2016-04-12 00:46 被阅读0次

    简单的记录一下自己的实际操作过程以及遇到的问题

    1. install nvm


    https://github.com/creationix/nvm
    

    1.1 执行安装脚本

    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
    

    1.2 问题

    -bash: nvm: command not found
    

    1.3 解决方式

    source .nvm/nvm.sh
    

    参考: http://stackoverflow.com/questions/16904658/node-version-manager-install-nvm-command-not-found

    1. insall node\watchman\flow


    sudo brew update && brew upgrade
    nvm install node && nvm alias default node
    brew install watchman
    brew install flow
    
    1. run react-native project


    3.1 创建项目
    3.2 编写代码
    3.3 运行程序

    rm -rf node_modules && npm install //Delete the node_modules folder
    node_modules/react-native/packager/packager.sh --reset-cache
    watchman watch-del-all
    

    参考


    https://facebook.github.io/react-native/docs/getting-started.html#content

    相关文章

      网友评论

          本文标题:mac os react-native guide

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