首次使用react native 笔记
2015-09-18 11:57
357 查看
1,使用命令行安装brew
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
2.安装node,watchman,flow
brew install watchman
brew install flow
brew install node
再次过程中可能会报错,说没有权限link watchman 等,所以安装之后再link一下,操作如下:
sudo brew link watchman
3.安装npm
sudo npm install -g react-native-cli
4.创建第一个helloWorld工程
react-native init HelloWorld
5.再次过程中一直报错,类似于这样:
尝试了n种办法来启动npm,最后都以失败告终,最后查阅了大量资料,这样操作一下,就可以了:
1.cd 你创建helloworld这个工程的iOS文件夹 (cd /Users/developer/HelloWorld/ios)
2.进去之后 npm install -d
3.npm start
4.ok,启动工程:
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
2.安装node,watchman,flow
brew install watchman
brew install flow
brew install node
再次过程中可能会报错,说没有权限link watchman 等,所以安装之后再link一下,操作如下:
sudo brew link watchman
3.安装npm
sudo npm install -g react-native-cli
4.创建第一个helloWorld工程
react-native init HelloWorld
5.再次过程中一直报错,类似于这样:
尝试了n种办法来启动npm,最后都以失败告终,最后查阅了大量资料,这样操作一下,就可以了:
1.cd 你创建helloworld这个工程的iOS文件夹 (cd /Users/developer/HelloWorld/ios)
2.进去之后 npm install -d
3.npm start
4.ok,启动工程:
相关文章推荐
- 【JAVASCRIPT】React学习- 与 flux 结合使用
- 这本小书的目的是引导你进入 React 和 Webpack 的世界。他们两个都是非常有用的技术,如果同时使用他们,前端开发会更加有趣。
- 一个资深iOS开发者对于React Native的看法
- React with webpack - part 1
- React Native for Android 官方文档中文版(最新)全国首发
- ReactiveCocoa基本组件:理解和使用RACCommand
- ReactiveCocoa 入门指导
- 说说ReactiveCocoa 2
- ReactiveCocoa与Functional Reactive Programming
- React.js 是什么?
- react-native试玩(7)-图片控件
- react.js 从零开始(六)Reconciliation
- 高并发模式之reactor原型代码
- Facebook的Web开发三板斧:React.js、Relay和GraphQL
- react work with angularjs together
- CocoaPods安装ReactiveCocoa
- React Native for Android初探
- react-native试玩(34)-配置Android开发环境
- 工作方向转变—— React Native For Android
- 5分钟内使用React、Webpack与ES6构建应用