- 1.通过Ruby安装Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 2.通过Homebrew安装nvm
brew install nvm
- 3.通过nvm安装node.js(如果安装失败或者说nvm not found command 则执行
source ~/.nvm/nvm.sh 后执行后再试试 如果还报错则执行
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash 后再重复source 那个操作后再往下走)
nvm install node && nvm alias default node
- 4.通过npm安装ReactNative
npm install -g react-native-cli
- 5.配置完成并创建工程(BlueEagleProject)
react-native init BlueEagleProject