/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
brew install watchman
npm install -g react-native-cli
sudo npm install -g react-native-cli
Cannot find module 'npmlog'
,在此之前试试这个:curl -0 -L http://npmjs.org/install.sh | sudo sh。
react-native init AwesomeProject (项目名)
cd AwesomeProject (项目名)
react-native run-ios
不久你应该看到新的应用程序在iPhone模拟器运行。