react native 搭建开发环境

react native 搭建开发环境时的终端执行代码,没有安Flow和Nuclide


Last login: Wed Sep 21 23:37:49 on ttys000
chenzhongsongdeMacBook-Pro:~ chenzhongsong$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
**==>**** This script will install:**
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
**==>**** The following existing directories will be made group writable:**
/usr/local/bin
**==>**** The following existing directories will have their owner set to ****chenzhongsong**:
/usr/local/bin
**==>**** The following existing directories will have their group set to ****admin**:
/usr/local/bin
**==>**** The following new directories will be created:**
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/opt
/usr/local/sbin
/usr/local/share
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var

Press RETURN to continue or any other key to abort
**==>**** /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin**
Password:
**==>**** /usr/bin/sudo /usr/sbin/chown chenzhongsong /usr/local/bin**
**==>**** /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin**
**==>**** /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var**
**==>**** /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var**
**==>**** /usr/bin/sudo /bin/chmod u+rwx share/zsh share/zsh/site-functions**
**==>**** /usr/bin/sudo /usr/sbin/chown chenzhongsong /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var**
**==>**** /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var**
**==>**** /usr/bin/sudo /bin/mkdir -p /Users/chenzhongsong/Library/Caches/Homebrew**
**==>**** /usr/bin/sudo /bin/chmod g+rwx /Users/chenzhongsong/Library/Caches/Homebrew**
**==>**** /usr/bin/sudo /usr/sbin/chown chenzhongsong /Users/chenzhongsong/Library/Caches/Homebrew**
**==>**** Downloading and installing Homebrew...**
remote: Counting objects: 1033, done.
remote: Compressing objects: 100% (929/929), done.
remote: Total 1033 (delta 95), reused 593 (delta 68), pack-reused 0
Receiving objects: 100% (1033/1033), 1.05 MiB | 7.00 KiB/s, done.
Resolving deltas: 100% (95/95), done.
From https://github.com/Homebrew/brew
 * [new branch]      master     -> origin/master
HEAD is now at bbed724 Merge pull request #1078 from ilovezfs/cmake-weak-symbols
**==>**** Homebrew has enabled anonymous aggregate user behaviour analytics**
Read the analytics documentation (and how to opt-out) here:
  https://git.io/brew-analytics
**==>**** Tapping homebrew/core**
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 3725, done.
remote: Compressing objects: 100% (3617/3617), done.
remote: Total 3725 (delta 15), reused 1247 (delta 0), pack-reused 0
Receiving objects: 100% (3725/3725), 2.91 MiB | 12.00 KiB/s, done.
Resolving deltas: 100% (15/15), done.
Checking connectivity... done.
Tapped 3604 formulae (3,752 files, 9M)

Already up-to-date.
**==>**** Installation successful!**
**==>**** Next steps**
Run `brew help` to get started
Further documentation: https://git.io/brew-docs
**==>**** Homebrew has enabled anonymous aggregate user behaviour analytics**
Read the analytics documentation (and how to opt-out) here:
  https://git.io/brew-analytics
chenzhongsongdeMacBook-Pro:~ chenzhongsong$ 
chenzhongsongdeMacBook-Pro:~ chenzhongsong$ brew install node
Checking out v1.0.2 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
  'cd /usr/local/Homebrew && git checkout v1.0.1
**==>**** Auto-updated Homebrew!**
Updated 1 tap (homebrew/core).
**==>**** Updated Formulae**
openssl                                  openssl@1.1                            

**==>**** Downloading https://homebrew.bintray.com/bottles/node-6.6.0.yosemite.bottle.**
######################################################################## 100.0%
**==>**** Pouring node-6.6.0.yosemite.bottle.tar.gz**
**==>**** Using the sandbox**
**==>**** Caveats**
Please note by default only English locale support is provided. If you need
full locale support you should either rebuild with full icu:
  `brew reinstall node --with-full-icu`
or add full icu data at runtime following:
  https://github.com/nodejs/node/wiki/Intl#using-and-customizing-the-small-icu-build

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
**==>**** Summary**
🍺  /usr/local/Cellar/node/6.6.0: 3,669 files, 41M
chenzhongsongdeMacBook-Pro:~ chenzhongsong$ npm install -g react-native-cli
/usr/local/bin/react-native -> /usr/local/lib/node_modules/react-native-cli/index.js
/usr/local/lib
└─┬ react-native-cli@1.0.0 
  ├─┬ chalk@1.1.3 
  │ ├── ansi-styles@2.2.1 
  │ ├── escape-string-regexp@1.0.5 
  │ ├─┬ has-ansi@2.0.0 
  │ │ └── ansi-regex@2.0.0 
  │ ├── strip-ansi@3.0.1 
  │ └── supports-color@2.0.0 
  ├── minimist@1.2.0 
  ├─┬ prompt@0.2.14 
  │ ├── pkginfo@0.4.0 
  │ ├─┬ read@1.0.7 
  │ │ └── mute-stream@0.0.6 
  │ ├── revalidator@0.1.8 
  │ ├─┬ utile@0.2.1 
  │ │ ├── async@0.2.10 
  │ │ ├── deep-equal@1.0.1 
  │ │ ├── i@0.3.5 
  │ │ ├─┬ mkdirp@0.5.1 
  │ │ │ └── minimist@0.0.8 
  │ │ ├── ncp@0.4.2 
  │ │ └─┬ rimraf@2.5.4 
  │ │   └─┬ glob@7.1.0 
  │ │     ├── fs.realpath@1.0.0 
  │ │     ├─┬ inflight@1.0.5 
  │ │     │ └── wrappy@1.0.2 
  │ │     ├── inherits@2.0.3 
  │ │     ├─┬ minimatch@3.0.3 
  │ │     │ └─┬ brace-expansion@1.1.6 
  │ │     │   ├── balanced-match@0.4.2 
  │ │     │   └── concat-map@0.0.1 
  │ │     ├── once@1.4.0 
  │ │     └── path-is-absolute@1.0.0 
  │ └─┬ winston@0.8.3 
  │   ├── colors@0.6.2 
  │   ├── cycle@1.0.3 
  │   ├── eyes@0.1.8 
  │   ├── isstream@0.1.2 
  │   ├── pkginfo@0.3.1 
  │   └── stack-trace@0.0.9 
  └── semver@5.3.0 

chenzhongsongdeMacBook-Pro:~ chenzhongsong$ brew install watchman
**==>**** Installing dependencies for watchman: ****pcre**
**==>**** Installing watchman dependency: ****pcre**
**==>**** Downloading https://homebrew.bintray.com/bottles/pcre-8.39.yosemite.bottle.t**
######################################################################## 100.0%
**==>**** Pouring pcre-8.39.yosemite.bottle.tar.gz**
🍺  /usr/local/Cellar/pcre/8.39: 203 files, 5.4M
**==>**** Installing ****watchman**
**==>**** Downloading https://homebrew.bintray.com/bottles/watchman-4.7.0.yosemite.bottle.tar.gz**
######################################################################## 100.0%
**==>**** Pouring watchman-4.7.0.yosemite.bottle.tar.gz**
**==>**** Using the sandbox**
🍺  /usr/local/Cellar/watchman/4.7.0: 21 files, 428.8K
chenzhongsongdeMacBook-Pro:~ chenzhongsong$ 

接着是测试安装
终端截图

Paste_Image.png

接头方向等待了较长时间(约20分钟)。截图中的代码是接着上面的代码来的,下面是终端代码,接着上面的代码

chenzhongsongdeMacBook-Pro:~ chenzhongsong$ react-native init AwesomeProject
This will walk you through creating a new React Native project in /Users/chenzhongsong/AwesomeProject
Installing react-native package from npm...
Setting up new React Native app in /Users/chenzhongsong/AwesomeProject
AwesomeProject@0.0.1 /Users/chenzhongsong/AwesomeProject
└── react@15.3.2 

**To run your app on iOS:**
   cd /Users/chenzhongsong/AwesomeProject
   react-native run-ios
   - or -
   Open /Users/chenzhongsong/AwesomeProject/ios/AwesomeProject.xcodeproj in Xcode
   Hit the Run button
**To run your app on Android:**
   Have an Android emulator running (quickest way to get started), or a device connected
   cd /Users/chenzhongsong/AwesomeProject
   react-native run-android
chenzhongsongdeMacBook-Pro:~ chenzhongsong$ 

执行成功。呵呵呵

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 199,636评论 5 468
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 83,890评论 2 376
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 146,680评论 0 330
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,766评论 1 271
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,665评论 5 359
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,045评论 1 276
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,515评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,182评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,334评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,274评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,319评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,002评论 3 315
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,599评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,675评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,917评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,309评论 2 345
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,885评论 2 341

推荐阅读更多精彩内容