React-Native 环境搭建

搭建环境
安装 Homebrew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

至于失败的解决方式官网上也有说, 我就不再复述了.

使用Homebrew来安装Node.js.
$ brew install node

这个过程还是比较慢的, 需要有点耐心

安装react-native-cli
$ npm install -g yarn react-native-cli

完成之后还需要设置镜像源

$ yarn config set registry https://registry.npm.taobao.org --global
$ yarn config set disturl https://npm.taobao.org/dist --global

基本环境就搭建完了, 编码的软件由自己选择, 开心就好.

你可能感兴趣的:(React-Native 环境搭建)