mac os react-native guide

2016-04-12  本文已影响0人  wenki

简单的记录一下自己的实际操作过程以及遇到的问题

  1. 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

  1. insall node\watchman\flow


sudo brew update && brew upgrade
nvm install node && nvm alias default node
brew install watchman
brew install flow
  1. 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

上一篇 下一篇

猜你喜欢

热点阅读