React Native安装

时间:2022-04-02 17:24:49

1.安装

1.1 安装Node.js

下载安装即可

1.2 安装Homebrew

终端中执行:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

1.3 Homebrew 来安装 nvm

终端中执行:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bash

1.4 brew 安装 watchman

$ sudo brew update
$ sudo brew install watchman

1.5 brew 安装 [flow] (http://www.flowtype.org/)

$ sudo brew install flow

1.6 npm安装react-native-cli的命令行工具

$ sudo npm install -g react-native-cli