react-native 环境搭建以及项目创建打包

   参考:http://www.lcode.org/%E5%8F%B2%E4%B8%8A%E6%9C%80%E8%AF%A6%E7%BB%86windows%E7%89%88%E6%9C%AC%E6%90%AD%E5%BB%BA%E5%AE%89%E8%A3%85react-native%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/

 其中在搭建环境中需要安装react-native命令行工具react-native-cli,需要执行npm install -g,国内需要使用淘宝镜像安装,有以下三种方式:

  1.通过config命令

  npm config set registry https://registry.npm.taobao.org 
  npm install -g (如果上面配置正确这个命令会有字符串response

  2.命令行指定

  npm --registry https://registry.npm.taobao.org  install -g 

  3.编辑 ~/.npmrc 加入下面内容

  registry = https://registry.npm.taobao.org

踩坑专访:http://www.cnblogs.com/meteoric_cry/p/4874517.html

原文地址:https://www.cnblogs.com/zijuan/p/5484484.html