ReactNative开发环境搭建

1.安装Homebrew 终端:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.安装node 终端:
安装完 Node 后建议设置 npm 需要设置如下镜像:
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global

brew install node 静看代码翻滚
3.安装watchman 终端:
brew install watchman 静看代码翻滚

4.安装flow 终端:
brew install flow 静看代码翻滚

5.安装React Native 终端:
sudo npm install -g react-native-cli

OK 环境配置成功!

因为react-native更新特别快,所以时不时需要更新
6.更新React Native 终端:
npm update -g react-native-cli

7.降级React Native 终端:
npm install --save [email protected]

8.查询版本React Native 终端:
npm info react-native

你可能感兴趣的:(ReactNative开发环境搭建)