React Native 入门环境搭建

参考文献:http://wiki.jikexueyuan.com/project/react-native/GettingStarted.html 


这里说下我的安装步骤以及安装时遇到的问题:

1、安装 Homebrew   网址: http://brew.sh/

2、安装 node      在mac 10.11中  直接使用  brew install node   会报错:

-bash: /usr/local/bin/brew: /bin/sh^M: bad interpreter: No such file or directory

解决方法:

cd  到 /Users/你的用户名/homebrew/bin   的路径下 使用  ./brew install node   安装node

重点是在mac 10.11  执行brew 命令时要 在homebrew路径下  用./brew  这个命令

之后安装  wget   同样执行 ./brew install wget

3、$npm install -g react-native-cli 

$ react-native init AwesomeProject

$ cd AwesomeProject/


这样helloworld reactNative 工程就OK拉。


猜你喜欢

转载自blog.csdn.net/qqMCY/article/details/50582094
今日推荐