简单的记录一下自己的实际操作过程以及遇到的问题
- install nvm
https://github.com/creationix/nvm
1.1 执行安装脚本
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
1.2 问题
-bash: nvm: command not found
1.3 解决方式
source .nvm/nvm.sh
参考: http://stackoverflow.com/questions/16904658/node-version-manager-install-nvm-command-not-found
- insall node\watchman\flow
sudo brew update && brew upgrade
nvm install node && nvm alias default node
brew install watchman
brew install flow
- run react-native project
3.1 创建项目
3.2 编写代码
3.3 运行程序
rm -rf node_modules && npm install //Delete the node_modules folder
node_modules/react-native/packager/packager.sh --reset-cache
watchman watch-del-all
参考
https://facebook.github.io/react-native/docs/getting-started.html#content
网友评论