One.配置环境
1.Homebrew Mac系统的包管理器,用于NodeJS和一些其他必须工具的软件
打开终端:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.使用homebrew 安装Node.js
打开终端 :brew install node
安装完node后建议设置npm镜像以加速后面的过程(或使用科学上网工具)。注意:不要使用cnpm!cnpm安装的模块路径比较奇怪,packager不能正常识别!
npmconfig set registry https://registry.npm.taobao.org--globalnpmconfig set disturl https://npm.taobao.org/dist--global
安装 Atom&Nuclide :http://www.hangge.com/blog/cache/detail_1490.html
2.创建一个工程
react-native init 工程的名称
网友评论