中文:https://reactnative.cn/docs/0.51/getting-started.html
英文:https://facebook.github.io/react-native/docs/getting-started.html
1. 安装Homebrew(官网的命令)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. 使用Homebrew来安装Node.js. 和 watchman
brew install node
brew install watchman
3.运行
npm install -g react-native-cli
4. 添加yarn
npminstall -g yarn react-native-cli
网友评论