Mac下配置ReactNative环境

中文: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

你可能感兴趣的:(Mac下配置ReactNative环境)