安装React-native步骤
1.安装包管理器homebrew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.检测homebrew是否安装成功: brew -v
3.安装node版本管理器nvm: brew install nvm
1) mkdir ~/.nvm
2)vim ~/.bash_profile 加入# For NVM
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
3) 检测是否已经安装了nvm help
4.安装node
brew install node
5.安装watchman brew install watchman
6.安装brew install flow
7.安装react-native: npm install -g react-native-cli
参考:http://www.cnblogs.com/meteoric_cry/p/4862314.html
原文链接:https://www.f2er.com/react/307377.html