rn环境搭建和命令相关

来源:互联网 发布:君临天下青囊师数据 编辑:程序博客网 时间:2024/05/13 12:23
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'PingFang SC'}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'PingFang SC'; min-height: 17.0px}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Courier}p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Courier; min-height: 14.0px}p.p5 {margin: 0.0px 0.0px 12.0px 0.0px; line-height: 14.0px; font: 12.0px 'Songti SC'}p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; min-height: 14.0px}p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #33bbc8; background-color: #ffffff}span.s1 {font: 12.0px Helvetica}span.s2 {font-kerning: none}span.s3 {font: 12.0px 'PingFang SC'; font-kerning: none}span.s4 {font: 12.0px Times; font-kerning: none}span.s5 {font-variant-ligatures: no-common-ligatures}

rn环境搭建(基于0.33版本):


/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


brew install node   未开vpn


[    安装完node后建议设置npm镜像以加速后面的过程(或使用科学上网工具)。

npm config set registry https://registry.npm.taobao.org --global

npm config set disturl https://npm.taobao.org/dist --global  ]



react-native init AwesomeProject


npm install -g react-native-cli



react-native --version


npm start

react-native run-ios


npm install --save  




-novid -perfectworld -language  // 乱入,请忽略


unable to start server:

See https://git.io/v5vcn for more information, either install watchman or run the following snippet:

  sudo sysctl -w kern.maxfiles=5242880

  sudo sysctl -w kern.maxfilesperproc=524288


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Lucida Grande'}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Lucida Grande'; min-height: 16.0px}

Node.js was installed at


   /usr/local/bin/node


npm was installed at


   /usr/local/bin/npm


Make sure that /usr/local/bin is in your $PATH.