Fork me on GitHub

ReactNative环境搭建

1.查看当前环境

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
➜  ~ brew -v
Homebrew 1.8.3
Homebrew/homebrew-core (git revision 38eb; last commit 2018-11-19)
➜ ~ node -v
v11.2.0
➜ ~ npm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.4.1 node/v11.2.0 darwin x64"

; node bin location = /Users/joy/.nvm/versions/node/v11.2.0/bin/node
; cwd = /Users/joy
; HOME = /Users/joy
; "npm config ls -l" to show all defaults.


╭───────────────────────────────────────────────────────────────╮
│ │
│ New minor version of npm available! 6.4.1 → 6.5.0 │
│ Changelog: https://github.com/npm/cli/releases/tag/v6.5.0 │
│ Run npm install -g npm to update! │
│ │
╰───────────────────────────────────────────────────────────────╯

安装完 node 后建议设置 npm 镜像以加速后面的过程(或使用科学上网工具)。注意:不要使用 cnpm!cnpm 安装的模块路径比较奇怪,packager 不能正常识别!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
➜  ~ npm config set registry https://registry.npm.taobao.org --global
➜ ~ npm config set disturl https://npm.taobao.org/dist --global
➜ ~ npm config list
; cli configs
metrics-registry = "https://registry.npm.taobao.org/"
scope = ""
user-agent = "npm/6.4.1 node/v11.2.0 darwin x64"

; globalconfig /Users/joy/.nvm/versions/node/v11.2.0/etc/npmrc
disturl = "https://npm.taobao.org/dist"
registry = "https://registry.npm.taobao.org/"

; node bin location = /Users/joy/.nvm/versions/node/v11.2.0/bin/node
; cwd = /Users/joy
; HOME = /Users/joy
; "npm config ls -l" to show all defaults.

2.Yarn、React Native 的命令行工具(react-native-cli)

Yarn是 Facebook 提供的替代 npm 的工具,可以加速 node 模块的下载。React Native 的命令行工具用于执行创建、初始化、更新项目、运行打包服务(packager)等任务。

1
2
3
4
5
6
7
➜  ~ npm install -g yarn react-native-cli
/Users/joy/.nvm/versions/node/v11.2.0/bin/react-native -> /Users/joy/.nvm/versions/node/v11.2.0/lib/node_modules/react-native-cli/index.js
/Users/joy/.nvm/versions/node/v11.2.0/bin/yarn -> /Users/joy/.nvm/versions/node/v11.2.0/lib/node_modules/yarn/bin/yarn.js
/Users/joy/.nvm/versions/node/v11.2.0/bin/yarnpkg -> /Users/joy/.nvm/versions/node/v11.2.0/lib/node_modules/yarn/bin/yarn.js
+ react-native-cli@2.0.1
+ yarn@1.13.0
added 42 packages from 15 contributors in 3.388s

安装完 yarn 后同理也要设置镜像源:

1
2
3
4
5
6
7
8
➜  ~ yarn config set registry https://registry.npm.taobao.org --global
yarn config v1.13.0
success Set "registry" to "https://registry.npm.taobao.org".
✨ Done in 0.04s.
➜ ~ yarn config set disturl https://npm.taobao.org/dist --global
yarn config v1.13.0
success Set "disturl" to "https://npm.taobao.org/dist".
✨ Done in 0.04s.

3.推荐安装的工具

Watchman

Watchman是由 Facebook 提供的监视文件系统变更的工具。安装此工具可以提高开发时的性能(packager 可以快速捕捉文件的变化从而实现实时刷新)。译注:此工具官方虽然是推荐安装,但在实践中,我们认为此工具是必须安装,否则可能无法正常开发。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
➜  ~ brew install watchman
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
anycable-go istioctl qalculate-gtk
aom jmxterm rakudo
astrometry-net kubeseal rargs
atomist-cli kubespy react-native-cli
chafa libgusb redis@4.0
cryptominisat libnova ruby@2.5
curl-openssl libpulsar ship
dav1d libvirt-glib simple-scan
dhall lsd sloc
dnscontrol minica sng
easyengine moarvm spice-protocol
esptool needle swagger-codegen@2
gambit-scheme nqp switch-lan-play
ghr opa tass64
goreman oxipng termtosvg
hexyl pass-otp up
i386-elf-gdb pict websocat
interactive-rebase-tool postgresql@10
==> Updated Formulae
gnutls ✔ libpst
libgpg-error ✔ libqalculate
libxml2 ✔ libreadline-java
nettle ✔ librealsense
openssl ✔ libressl
python@2 ✔ librsvg
readline ✔ libsamplerate
sqlite ✔ libsecret
abcm2ps libsodium
abook libspectre
abyss libssh
activemq libstfl
adwaita-icon-theme libswiften
afflib libtcod
aircrack-ng libtiff
akamai libtins
alexjs libuv
algernon libvirt
allure libvisio
amazon-ecs-cli libvmaf
ammonite-repl libwebsockets
amqp-cpp libxmlsec1
angle-grinder libxslt
angular-cli lighttpd
anjuta linkerd
annie lldpd
ansible llvm
ansible-cmdb llvm@3.9
ansifilter llvm@4
antlr llvm@5
antlr4-cpp-runtime llvm@6
apache-arrow-glib lmdb
apache-drill lmod
apache-flink logstash
apache-geode logtalk
apache-spark lolcat
aptly lsdvd
arangodb lxc
arcade-learning-environment mackup
argus-clients macvim
ark mailutils
armor makensis
asciinema mame
asdf mapnik
aubio mapserver
augeas mariadb
augustus mariadb-connector-c
autorest mariadb@10.2
aws-es-proxy mas
aws-sdk-cpp maxwell
awscli mdbtools
awslogs mdcat
azure-cli mdk
b2-tools media-info
babel mercurial
babl mesa
bacula-fd meson
ballerina micronaut
basex midnight-commander
bash mikutter
bat mimic
bazel minio
bcal minio-mc
bdw-gc miniserve
beagle mint
bear mitie
bento4 mkcert
bettercap mkclean
bgpdump mkl-dnn
bgpq3 mkvtoolnix
bigloo mlt
binaryen mmseqs2
bind mockserver
bison monero
bitcoin monetdb
bitrise mongodb
bitwarden-cli mongodb@3.4
blackbox mongodb@3.6
blast mono
blink1 moreutils
bluepill mosquitto
boost mozjpeg
botan mpc
brew-php-switcher mpd
buildifier mpich
bullet mplayer
bundletool mruby
byteman mu
bzt mutt
c-blosc mycli
cabal-install mysql
cabextract nasm
cadaver nativefier
caf ncmpcpp
caffe neo4j
cake neofetch
calc neovim
camlp5 netcdf
capstone netdata
cargo-completion netpbm
carla newlisp
catimg newsboat
cayley nghttp2
ccache nginx
ceres-solver ngspice
certbot nickle
certigo nmh
cfitsio nng
cgdb nnn
cgit node
cglm node-build
chakra node@10
checkbashisms node@6
checkstyle node@8
chronograf nodenv
circleci nomad
citus nsd
ckan nss
clamav numpy
clang-format nuxeo
clblast nvm
cli53 nwchem
clisp ocaml
clojure ocaml-num
cmake ocamlsdl
cockroach octave
cocoapods ompl
cointop oniguruma
commandbox opam
composer open-mpi
conan openapi-generator
confluent-oss openblas
console_bridge opencoarrays
container-diff openconnect
convox opencv
couchdb opencv@2
cp2k opendbx
cpanminus openfortivpn
cppcheck openimageio
create-dmg openldap
crosstool-ng openmsx
cryptopp openrct2
crystal-icr openssl@1.1
curl opentsdb
cython openvdb
dartsim orc-tools
dasht osm2pgrouting
davix osmium-tool
dbhash osrm-backend
dbus packer
dcd pagmo
dcm2niix paket
dependency-check pandoc
devtodo pandoc-citeproc
dfmt pandoc-crossref
dialog parallel
diamond parallelstl
diceware pari
diff-pdf passenger
diffutils pazpar2
digdag pce
digitemp pcl
direnv pdal
dita-ot pdfpc
django-completion pdftoedn
dlib pdftoipe
dmd pdsh
dnscrypt-proxy percona-server
dnscrypt-wrapper percona-server@5.6
docfx perl
docker petsc
docker-completion petsc-complex
docker-compose pgbadger
docker-compose-completion pgcli
docker-credential-helper-ecr pgformatter
docker-machine pgroonga
docker-machine-completion pgrouting
docker-machine-nfs pgweb
docker-machine-parallels phoronix-test-suite
doctl php
doitlive php-code-sniffer
dosbox-x php-cs-fixer
dovecot php@7.1
doxygen phpmyadmin
dpkg phpunit
druid picard-tools
dscanner pig
dub pijul
duo_unix pilosa
dvm pip-completion
dwarf pipenv
dwdiff pixman
dwm planck
e2fsprogs plantuml
eccodes platformio
ed plplot
efl pmd
eigen pngquant
ekg2 podofo
elasticsearch poppler
elasticsearch@5.6 postgis
elixir postgres-xc
emacs-clang-complete-async postgresql
embulk postgresql@9.4
emscripten postgresql@9.5
envconsul postgresql@9.6
eprover ppsspp
epubcheck pqiv
erlang pre-commit
erlang@20 presto
eslint prettier
etcd primesieve
ethereum profanity
evince prometheus
exiv2 protobuf
exploitdb ps2eps
eye-d3 pspg
faas-cli pulumi
fabio pumba
fauna-shell purescript
fb-client pushpin
fbi-servefiles pwntools
fdk-aac pwsafe
fdk-aac-encoder pyenv
ffmpeg pygitup
ffmpeg2theora pygobject3
ffmpeg@2.8 python
ffmpegthumbnailer python-yq
ffms2 qbs
firebase-cli qemu
fish qmmp
fltk qpdf
fluent-bit qpid-proton
fluid-synth qt
flume quicktype
fluxctl r
flyway rabbitmq
fmt radare2
fn rakudo-star
fontforge rancher-cli
fonttools rclone
fping re2
freeciv rebar3
freeling recon-ng
freetds recutils
frugal redis
fselect renameutils
fswatch repo
fuseki restic
futhark riemann-client
fwup rke
fx rlwrap
gammaray robot-framework
gauche rom-tools
gawk roswell
gcab rpm
gcc@6 rswift
gcc@7 rtags
gdal ruby
gdb ruby-build
gdcm ruby@1.8
geeqie ruby@2.0
gegl ruby@2.3
geos ruby@2.4
get_iplayer rust
getdns rustup-init
gexiv2 sagittarius-scheme
ghostscript salt
ginac sbcl
git sbt
git-annex sbt@0.13
git-archive-all scala
git-lfs scalapack
git-quick-stats sceptre
git-standup schismtracker
gitbucket scipy
github-markdown-toc sdcc
gitlab-gem sdcv
gitlab-runner sdl2
gjs serverless
glances shadowsocks-libev
glib shc
global shellcheck
gmic shellshare
gmime shfmt
gmsh shibboleth-sp
gmt signify-osx
gnome-latex sile
gnu-chess sip
gnu-sed siril
gnu-smalltalk skaffold
gnu-tar skafos
gnu-units skinny
gnupg skopeo
gnuplot smartmontools
gnuplot@4 smimesign
gnuradio snapcraft
go socat
go-bindata solr
go@1.10 sonar-scanner
gobject-introspection sonobuoy
gocryptfs source-to-image
godep sourcekitten
goenv sox
goffice spatialite-tools
golang-migrate sphinx-doc
gopass spidermonkey
goreleaser spoof-mac
gowsdl spotbugs
gphoto2 sqlcipher
gpsbabel sqldiff
gqlplus sqlite-analyzer
gr-osmosdr sqlmap
gradle statik
grafana stellar-core
grails stockfish
grakn stone-soup
graph-tool stubby
graphicsmagick stunnel
graphite2 subversion
grep sundials
groff supervisor
groovy swagger-codegen
grpc swi-prolog
grv swift
gst-plugins-ugly swiftformat
gst-python swiftlint
gstreamermm syncthing
gtk+3 sysbench
gtk-doc sysdig
gtkmm3 takt
guile tarantool
guile@2.0 taskell
gupnp-tools tbb
gzip tcc
handbrake tcpdump
haproxy tcpreplay
harfbuzz tectonic
haskell-stack telegraf
haste-client telegram-cli
hbase teleport
hcloud temporal_tables
healpix termius
helmfile terraform
hfstospell terraform_landscape
highlight terragrunt
hss tgui
http-parser thefuck
httpie theharvester
hub tig
hugo tika
hunspell tile38
hwloc tippecanoe
hydra tmuxinator-completion
hyperfine tokei
ibex tomcat
icemon tomcat-native
icu4c tomcat@7
ike-scan tomcat@8
imagemagick tomee-webprofile
immortal topgrade
influxdb tor
ios-webkit-debug-proxy tox
ipython trace2html
isync traefik
itstool translate-shell
jabba travis
jansson ttyd
jbig2dec twoping
jboss-forge typescript
jdnssec-tools ubertooth
jena ucloud
jenkins uhd
jenkins-lts unbound
jfrog-cli-go uncrustify
jhipster unnethack
jid urdfdom_headers
joplin urh
jsonnet uriparser
juju uru
jump v8
kafka vagrant-completion
kakoune vala
kapacitor vaulted
kibana vegeta
kibana@5.6 verilator
kitchen-sync vert.x
knot vfuse
knot-resolver vice
kobalt vim
kontena vim@7.4
kops vips
kotlin visp
kpcli vsts-cli
kube-aws vte
kubectx vte3
kubeless vtk
kubernetes-cli wcslib
kubernetes-helm weaver
kustomize weboob
lablgtk webp
languagetool webpack
laszip weechat
latex2html wget
lcm whois
ldapvi widelands
ldc wine
lean-cli winetricks
leiningen wireguard-go
leptonica wireguard-tools
less wireshark
lftp with-readline
libassuan woboq_codebrowser
libatomic_ops wolfssl
libav wp-cli
libbi wp-cli-completion
libbladerf wpscan
libbtbb wtf
libccd wxmaxima
libcdr x264
libcds xcodegen
libcec xdot
libcerf xmake
libcouchbase xml-security-c
libdazzle xml-tooling-c
libedit xonsh
libetpan xsimd
libextractor xtensor
libfreehand yafc
libgda yarn
libgphoto2 yaz
libgsf ydcv
libgxps yle-dl
libhttpserver yosys
libical you-get
libidn2 youtube-dl
libjwt yq
liblcf z3
libmicrohttpd zebra
libmspub zeromq
libnice zile
libomp zim
libosmium znc
libphonenumber zorba
libplctag zsh-autosuggestions
libpng zsh-completions
libpqxx zstd
libpsl zurl
==> Renamed Formulae
gutenberg -> zola hh -> hstr php72 -> php@7.2
==> Deleted Formulae
apple-gcc42 ffmbc ld64 pyexiv2
aptly-completion gnome-doc-utils php@5.6 rock
cctools gradle@2.14 php@7.0
cctools-headers gv pldebugger

==> Installing dependencies for watchman: openssl, pcre, readline, sqlite, xz and python
==> Installing watchman dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2q.mojave.bottl
######################################################################## 100.0%
==> Pouring openssl-1.0.2q.mojave.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"

For pkg-config to find openssl you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2q: 1,794 files, 12.1MB
==> Installing watchman dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.42.mojave.bottle.tar
######################################################################## 100.0%
==> Pouring pcre-8.42.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/pcre/8.42: 204 files, 5.5MB
==> Installing watchman dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.0.mojave.bottl
######################################################################## 100.0%
==> Pouring readline-8.0.0.mojave.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
export LDFLAGS="-L/usr/local/opt/readline/lib"
export CPPFLAGS="-I/usr/local/opt/readline/include"

For pkg-config to find readline you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"

==> Summary
🍺 /usr/local/Cellar/readline/8.0.0: 48 files, 1.5MB
==> Installing watchman dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.26.0_1.mojave.bott
######################################################################## 100.0%
==> Pouring sqlite-3.26.0_1.mojave.bottle.tar.gz
==> Caveats
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc

For compilers to find sqlite you may need to set:
export LDFLAGS="-L/usr/local/opt/sqlite/lib"
export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

==> Summary
🍺 /usr/local/Cellar/sqlite/3.26.0_1: 11 files, 3.7MB
==> Installing watchman dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.4.mojave.bottle.tar.
######################################################################## 100.0%
==> Pouring xz-5.2.4.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/xz/5.2.4: 92 files, 1MB
==> Installing watchman dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.2_1.mojave.bottl
######################################################################## 100.0%
==> Pouring python-3.7.2_1.mojave.bottle.1.tar.gz
==> /usr/local/Cellar/python/3.7.2_1/bin/python3 -s setup.py --no-user-cfg insta
==> /usr/local/Cellar/python/3.7.2_1/bin/python3 -s setup.py --no-user-cfg insta
==> /usr/local/Cellar/python/3.7.2_1/bin/python3 -s setup.py --no-user-cfg insta
==> Caveats
Python has been installed as
/usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
brew install python@2

You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺 /usr/local/Cellar/python/3.7.2_1: 3,833 files, 59.3MB
==> Installing watchman
==> Downloading https://homebrew.bintray.com/bottles/watchman-4.9.0_2.mojave.bot
######################################################################## 100.0%
==> Pouring watchman-4.9.0_2.mojave.bottle.tar.gz
==> launchctl unload -F /Users/joy/Library/LaunchAgents/com.github.facebook.watc
🍺 /usr/local/Cellar/watchman/4.9.0_2: 23 files, 2.1MB
==> Caveats
==> openssl
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"

For pkg-config to find openssl you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

==> readline
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
export LDFLAGS="-L/usr/local/opt/readline/lib"
export CPPFLAGS="-I/usr/local/opt/readline/include"

For pkg-config to find readline you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"

==> sqlite
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc

For compilers to find sqlite you may need to set:
export LDFLAGS="-L/usr/local/opt/sqlite/lib"
export CPPFLAGS="-I/usr/local/opt/sqlite/include"

For pkg-config to find sqlite you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig"

==> python
Python has been installed as
/usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
brew install python@2

You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

4.初始化

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
➜  ReactNative react-native init AwesomeProject
This will walk you through creating a new React Native project in /Users/joy/ReactNative/AwesomeProject
Using yarn v1.13.0
Installing react-native...
yarn add v1.13.0
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > react-native@0.57.8" has unmet peer dependency "react@16.6.3".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 403 new dependencies.
info Direct dependencies
└─ react-native@0.57.8
info All dependencies
├─ @babel/helper-builder-binary-assignment-operator-visitor@7.1.0
├─ @babel/helper-builder-react-jsx@7.0.0
├─ @babel/helper-call-delegate@7.1.0
├─ @babel/helper-create-class-features-plugin@7.2.3
├─ @babel/helper-define-map@7.1.0
├─ @babel/helper-explode-assignable-expression@7.1.0
├─ @babel/helper-hoist-variables@7.0.0
├─ @babel/helper-module-transforms@7.2.2
├─ @babel/helper-remap-async-to-generator@7.1.0
├─ @babel/helper-replace-supers@7.2.3
├─ @babel/helper-wrap-function@7.2.0
├─ @babel/helpers@7.2.0
├─ @babel/highlight@7.0.0
├─ @babel/plugin-external-helpers@7.2.0
├─ @babel/plugin-proposal-export-default-from@7.2.0
├─ @babel/plugin-syntax-class-properties@7.2.0
├─ @babel/plugin-syntax-dynamic-import@7.2.0
├─ @babel/plugin-syntax-export-default-from@7.2.0
├─ @babel/plugin-syntax-flow@7.2.0
├─ @babel/plugin-syntax-nullish-coalescing-operator@7.2.0
├─ @babel/plugin-syntax-object-rest-spread@7.2.0
├─ @babel/plugin-syntax-optional-catch-binding@7.2.0
├─ @babel/plugin-syntax-optional-chaining@7.2.0
├─ @babel/plugin-syntax-typescript@7.2.0
├─ @babel/plugin-transform-async-to-generator@7.2.0
├─ @babel/plugin-transform-block-scoped-functions@7.2.0
├─ @babel/plugin-transform-exponentiation-operator@7.2.0
├─ @babel/plugin-transform-member-expression-literals@7.2.0
├─ @babel/plugin-transform-object-assign@7.2.0
├─ @babel/plugin-transform-object-super@7.2.0
├─ @babel/plugin-transform-property-literals@7.2.0
├─ @babel/plugin-transform-react-jsx-source@7.2.0
├─ @babel/plugin-transform-regenerator@7.0.0
├─ @babel/plugin-transform-runtime@7.2.0
├─ @babel/plugin-transform-sticky-regex@7.2.0
├─ @babel/plugin-transform-typescript@7.2.0
├─ @babel/plugin-transform-unicode-regex@7.2.0
├─ @babel/register@7.0.0
├─ @babel/runtime@7.2.0
├─ abbrev@1.1.1
├─ accepts@1.3.5
├─ ansi-colors@1.1.0
├─ ansi-cyan@0.1.1
├─ ansi-escapes@3.1.0
├─ ansi-gray@0.1.1
├─ ansi-red@0.1.1
├─ ansi-styles@3.2.1
├─ ansi@0.3.1
├─ anymatch@2.0.0
├─ aproba@1.2.0
├─ are-we-there-yet@1.1.5
├─ argparse@1.0.10
├─ arr-flatten@1.1.0
├─ array-filter@0.0.1
├─ array-map@0.0.0
├─ array-reduce@0.0.0
├─ array-slice@0.2.3
├─ art@0.10.3
├─ asap@2.0.6
├─ assign-symbols@1.0.0
├─ async-limiter@1.0.0
├─ async@2.6.1
├─ atob@2.1.2
├─ babel-plugin-syntax-trailing-function-commas@7.0.0-beta.0
├─ babel-preset-fbjs@3.1.2
├─ balanced-match@1.0.0
├─ base@0.11.2
├─ base64-js@1.3.0
├─ basic-auth@2.0.1
├─ big-integer@1.6.40
├─ bplist-creator@0.0.7
├─ bplist-parser@0.1.1
├─ brace-expansion@1.1.11
├─ braces@2.3.2
├─ bser@2.0.0
├─ builtin-modules@1.1.1
├─ bytes@3.0.0
├─ cache-base@1.0.1
├─ caller-callsite@2.0.0
├─ caller-path@2.0.0
├─ callsites@2.0.0
├─ capture-exit@1.2.0
├─ chardet@0.4.2
├─ chownr@1.1.1
├─ class-utils@0.3.6
├─ cli-cursor@2.1.0
├─ cli-width@2.2.0
├─ cliui@3.2.0
├─ code-point-at@1.1.0
├─ collection-visit@1.0.0
├─ color-convert@1.9.3
├─ color-name@1.1.3
├─ color-support@1.1.3
├─ commander@2.19.0
├─ commondir@1.0.1
├─ compressible@2.0.15
├─ compression@1.7.3
├─ concat-map@0.0.1
├─ concat-stream@1.6.2
├─ console-control-strings@1.1.0
├─ convert-source-map@1.6.0
├─ copy-descriptor@0.1.1
├─ core-js@2.6.2
├─ core-util-is@1.0.2
├─ cosmiconfig@5.0.7
├─ create-react-class@15.6.3
├─ cross-spawn@5.1.0
├─ debug@2.6.9
├─ decamelize@1.2.0
├─ decode-uri-component@0.2.0
├─ deep-extend@0.6.0
├─ delegates@1.0.0
├─ destroy@1.0.4
├─ detect-libc@1.0.3
├─ detect-newline@2.1.0
├─ dom-walk@0.1.1
├─ ee-first@1.1.1
├─ encoding@0.1.12
├─ envinfo@5.12.1
├─ error-ex@1.3.2
├─ errorhandler@1.5.0
├─ esprima@4.0.1
├─ esutils@2.0.2
├─ etag@1.8.1
├─ event-target-shim@1.1.1
├─ eventemitter3@3.1.0
├─ execa@0.7.0
├─ expand-brackets@2.1.4
├─ expand-range@1.8.2
├─ external-editor@2.2.0
├─ extglob@2.0.4
├─ fancy-log@1.3.3
├─ fbjs-css-vars@1.0.2
├─ fbjs-scripts@1.0.1
├─ figures@2.0.0
├─ filename-regex@2.0.1
├─ fill-range@4.0.0
├─ finalhandler@1.1.0
├─ find-cache-dir@1.0.0
├─ find-up@2.1.0
├─ for-in@1.0.2
├─ for-own@0.1.5
├─ fresh@0.5.2
├─ fs-minipass@1.2.5
├─ fs.realpath@1.0.0
├─ fsevents@1.2.4
├─ gauge@1.2.7
├─ get-caller-file@1.0.3
├─ get-stream@3.0.0
├─ get-value@2.0.6
├─ glob-base@0.3.0
├─ glob-parent@2.0.0
├─ glob@7.1.3
├─ global@4.3.2
├─ growly@1.3.0
├─ has-ansi@2.0.0
├─ has-flag@3.0.0
├─ has-unicode@2.0.1
├─ has-value@1.0.0
├─ has-values@1.0.0
├─ home-or-tmp@3.0.0
├─ hosted-git-info@2.7.1
├─ http-errors@1.6.3
├─ iconv-lite@0.4.24
├─ ignore-walk@3.0.1
├─ image-size@0.6.3
├─ import-fresh@2.0.0
├─ imurmurhash@0.1.4
├─ inflight@1.0.6
├─ inherits@2.0.3
├─ ini@1.3.5
├─ inquirer@3.3.0
├─ invariant@2.2.4
├─ invert-kv@1.0.0
├─ is-accessor-descriptor@1.0.0
├─ is-arrayish@0.2.1
├─ is-builtin-module@1.0.0
├─ is-data-descriptor@1.0.0
├─ is-descriptor@1.0.2
├─ is-directory@0.3.1
├─ is-dotfile@1.0.3
├─ is-equal-shallow@0.1.3
├─ is-fullwidth-code-point@1.0.0
├─ is-plain-object@2.0.4
├─ is-posix-bracket@0.1.1
├─ is-primitive@2.0.0
├─ is-promise@2.1.0
├─ is-stream@1.1.0
├─ is-windows@1.0.2
├─ isarray@1.0.0
├─ isexe@2.0.0
├─ jest-docblock@23.2.0
├─ jest-serializer@23.0.1
├─ jest-worker@23.2.0
├─ js-tokens@4.0.0
├─ js-yaml@3.12.1
├─ jsesc@2.5.2
├─ json-parse-better-errors@1.0.2
├─ json-stable-stringify@1.0.1
├─ json5@2.1.0
├─ jsonfile@2.4.0
├─ kind-of@3.2.2
├─ klaw@1.3.1
├─ lcid@1.0.0
├─ load-json-file@2.0.0
├─ locate-path@2.0.0
├─ lodash.pad@4.5.1
├─ lodash.padend@4.6.1
├─ lodash.padstart@4.6.1
├─ lru-cache@4.1.5
├─ make-dir@1.3.0
├─ makeerror@1.0.11
├─ map-visit@1.0.0
├─ math-random@1.0.3
├─ mem@1.1.0
├─ merge@1.2.1
├─ metro-babel-register@0.48.5
├─ metro-babel7-plugin-react-transform@0.48.5
├─ metro-config@0.48.5
├─ metro-memory-fs@0.48.5
├─ metro-minify-uglify@0.48.5
├─ metro-react-native-babel-preset@0.48.5
├─ metro-source-map@0.48.5
├─ metro@0.48.5
├─ mime-db@1.37.0
├─ mime-types@2.1.11
├─ mime@1.6.0
├─ min-document@2.19.0
├─ minimatch@3.0.4
├─ minimist@1.2.0
├─ minizlib@1.2.1
├─ mixin-deep@1.3.1
├─ mkdirp@0.5.1
├─ morgan@1.9.1
├─ mute-stream@0.0.7
├─ nan@2.12.1
├─ nanomatch@1.2.13
├─ needle@2.2.4
├─ negotiator@0.6.1
├─ node-int64@0.4.0
├─ node-modules-regexp@1.0.0
├─ node-notifier@5.3.0
├─ node-pre-gyp@0.10.3
├─ nopt@4.0.1
├─ normalize-package-data@2.4.0
├─ normalize-path@2.1.1
├─ npm-bundled@1.0.5
├─ npm-packlist@1.2.0
├─ npm-run-path@2.0.2
├─ npmlog@2.0.4
├─ nullthrows@1.1.1
├─ number-is-nan@1.0.1
├─ object-assign@4.1.1
├─ object-copy@0.1.0
├─ object.omit@2.0.1
├─ onetime@2.0.1
├─ opn@3.0.3
├─ optimist@0.6.1
├─ options@0.0.6
├─ os-homedir@1.0.2
├─ os-locale@2.1.0
├─ os-tmpdir@1.0.2
├─ osenv@0.1.5
├─ p-finally@1.0.0
├─ p-limit@1.3.0
├─ p-locate@2.0.0
├─ p-try@1.0.0
├─ parse-glob@3.0.4
├─ parse-json@4.0.0
├─ parse-node-version@1.0.0
├─ pascalcase@0.1.1
├─ path-exists@3.0.0
├─ path-is-absolute@1.0.1
├─ path-key@2.0.1
├─ path-parse@1.0.6
├─ path-type@2.0.0
├─ pirates@4.0.0
├─ pkg-dir@2.0.0
├─ plist@3.0.1
├─ plugin-error@0.1.2
├─ posix-character-classes@0.1.1
├─ preserve@0.2.0
├─ pretty-format@4.3.1
├─ private@0.1.8
├─ process-nextick-args@2.0.0
├─ process@0.5.2
├─ prop-types@15.6.2
├─ pseudomap@1.0.2
├─ randomatic@3.1.1
├─ range-parser@1.2.0
├─ rc@1.2.8
├─ react-clone-referenced-element@1.1.0
├─ react-deep-force-update@1.1.2
├─ react-devtools-core@3.6.0
├─ react-native@0.57.8
├─ react-proxy@1.1.8
├─ react-timer-mixin@0.13.4
├─ read-pkg-up@2.0.0
├─ read-pkg@2.0.0
├─ readable-stream@2.3.6
├─ regenerate-unicode-properties@7.0.0
├─ regenerator-runtime@0.11.1
├─ regenerator-transform@0.13.3
├─ regex-cache@0.4.4
├─ regex-not@1.0.2
├─ regexpu-core@4.4.0
├─ regjsgen@0.5.0
├─ regjsparser@0.6.0
├─ remove-trailing-separator@1.1.0
├─ require-directory@2.1.1
├─ require-main-filename@1.0.1
├─ resolve-from@3.0.0
├─ resolve-url@0.2.1
├─ resolve@1.9.0
├─ restore-cursor@2.0.0
├─ ret@0.1.15
├─ rimraf@2.6.3
├─ rsvp@3.6.2
├─ run-async@2.3.0
├─ rx-lite-aggregates@4.0.8
├─ rx-lite@4.0.8
├─ safer-buffer@2.1.2
├─ sane@2.5.2
├─ sax@1.1.6
├─ semver@5.6.0
├─ send@0.16.2
├─ serialize-error@2.1.0
├─ serve-static@1.13.2
├─ set-blocking@2.0.0
├─ set-value@2.0.0
├─ setprototypeof@1.1.0
├─ shebang-command@1.2.0
├─ shebang-regex@1.0.0
├─ shell-quote@1.6.1
├─ shellwords@0.1.1
├─ signal-exit@3.0.2
├─ simple-plist@0.2.1
├─ slide@1.1.6
├─ snapdragon-node@2.1.1
├─ snapdragon-util@3.0.1
├─ source-map-resolve@0.5.2
├─ source-map-support@0.5.10
├─ source-map-url@0.4.0
├─ spdx-correct@3.1.0
├─ spdx-exceptions@2.2.0
├─ split-string@3.1.0
├─ sprintf-js@1.0.3
├─ stacktrace-parser@0.1.4
├─ static-extend@0.1.2
├─ statuses@1.3.1
├─ stream-buffers@2.2.0
├─ string_decoder@1.1.1
├─ string-width@1.0.2
├─ strip-ansi@3.0.1
├─ strip-bom@3.0.0
├─ strip-eof@1.0.0
├─ strip-json-comments@2.0.1
├─ supports-color@2.0.0
├─ tar@4.4.8
├─ temp@0.8.3
├─ throat@4.1.0
├─ through@2.3.8
├─ through2@2.0.5
├─ time-stamp@1.1.0
├─ tmp@0.0.33
├─ tmpl@1.0.4
├─ to-fast-properties@2.0.0
├─ to-regex-range@2.1.1
├─ trim-right@1.0.1
├─ typedarray@0.0.6
├─ uglify-es@3.3.9
├─ ultron@1.0.2
├─ unicode-canonical-property-names-ecmascript@1.0.4
├─ unicode-match-property-ecmascript@1.0.4
├─ unicode-match-property-value-ecmascript@1.0.2
├─ unicode-property-aliases-ecmascript@1.0.4
├─ union-value@1.0.0
├─ unpipe@1.0.0
├─ unset-value@1.0.0
├─ urix@0.1.0
├─ use@3.1.1
├─ util-deprecate@1.0.2
├─ utils-merge@1.0.1
├─ uuid@3.3.2
├─ validate-npm-package-license@3.0.4
├─ vary@1.1.2
├─ walker@1.0.7
├─ watch@0.18.0
├─ whatwg-fetch@3.0.0
├─ which-module@2.0.0
├─ which@1.3.1
├─ wide-align@1.1.3
├─ wrap-ansi@2.1.0
├─ write-file-atomic@1.3.4
├─ ws@1.1.5
├─ xcode@1.1.0
├─ xmlbuilder@9.0.7
├─ xmldoc@0.4.0
├─ xpipe@1.0.5
├─ xtend@4.0.1
├─ y18n@3.2.1
├─ yallist@3.0.3
└─ yargs-parser@7.0.0
✨ Done in 47.42s.
info There appears to be trouble with your network connection. Retrying...
Setting up new React Native app in /Users/joy/ReactNative/AwesomeProject
Adding React...
yarn add v1.13.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ react@16.6.3
info All dependencies
├─ react@16.6.3
└─ scheduler@0.11.3
✨ Done in 4.35s.
Adding Jest...
yarn add v1.13.0
[1/4] 🔍 Resolving packages...
warning jest > jest-cli > prompts > kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "metro-react-native-babel-preset > @babel/plugin-proposal-class-properties@7.2.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-proposal-nullish-coalescing-operator@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-proposal-object-rest-spread@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-proposal-optional-catch-binding@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-proposal-optional-chaining@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-flow-strip-types@7.2.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-modules-commonjs@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-arrow-functions@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-block-scoping@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-classes@7.2.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-computed-properties@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-destructuring@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-for-of@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-function-name@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-literals@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-parameters@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-react-display-name@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-react-jsx@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-shorthand-properties@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-spread@7.2.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-template-literals@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-proposal-export-default-from@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-syntax-dynamic-import@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-syntax-export-default-from@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-exponentiation-operator@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-object-assign@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-react-jsx-source@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-regenerator@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-runtime@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-sticky-regex@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-typescript@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/plugin-transform-unicode-regex@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > babel-jest@23.6.0" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0".
warning " > babel-jest@23.6.0" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0".
warning " > metro-react-native-babel-preset@0.51.1" has unmet peer dependency "@babel/core@*".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 130 new dependencies.
info Direct dependencies
├─ babel-jest@23.6.0
├─ jest@23.6.0
├─ metro-react-native-babel-preset@0.51.1
└─ react-test-renderer@16.6.3
info All dependencies
├─ acorn-globals@4.3.0
├─ acorn-walk@6.1.1
├─ acorn@5.7.3
├─ ajv@6.7.0
├─ append-transform@0.4.0
├─ array-equal@1.0.0
├─ arrify@1.0.1
├─ asn1@0.2.4
├─ astral-regex@1.0.0
├─ asynckit@0.4.0
├─ aws-sign2@0.7.0
├─ aws4@1.8.0
├─ babel-core@6.26.3
├─ babel-generator@6.26.1
├─ babel-helpers@6.24.1
├─ babel-jest@23.6.0
├─ babel-plugin-jest-hoist@23.2.0
├─ babel-register@6.26.0
├─ babel-template@6.26.0
├─ bcrypt-pbkdf@1.0.2
├─ browser-process-hrtime@0.1.3
├─ browser-resolve@1.11.3
├─ caseless@0.12.0
├─ ci-info@1.6.0
├─ cliui@4.1.0
├─ co@4.6.0
├─ combined-stream@1.0.7
├─ cssom@0.3.4
├─ cssstyle@1.1.1
├─ dashdash@1.14.1
├─ data-urls@1.1.0
├─ deep-is@0.1.3
├─ default-require-extensions@1.0.0
├─ delayed-stream@1.0.0
├─ detect-indent@4.0.0
├─ diff@3.5.0
├─ domexception@1.0.1
├─ ecc-jsbn@0.1.2
├─ es-abstract@1.13.0
├─ es-to-primitive@1.2.0
├─ escodegen@1.11.0
├─ estraverse@4.2.0
├─ expect@23.6.0
├─ extend@3.0.2
├─ extsprintf@1.3.0
├─ fast-deep-equal@2.0.1
├─ fast-levenshtein@2.0.6
├─ fileset@2.0.3
├─ forever-agent@0.6.1
├─ form-data@2.3.3
├─ getpass@0.1.7
├─ handlebars@4.0.12
├─ har-schema@2.0.0
├─ har-validator@5.1.3
├─ has-symbols@1.0.0
├─ has@1.0.3
├─ html-encoding-sniffer@1.0.2
├─ http-signature@1.2.0
├─ ip-regex@3.0.0
├─ is-date-object@1.0.1
├─ is-finite@1.0.2
├─ is-generator-fn@1.0.0
├─ is-regex@1.0.4
├─ is-symbol@1.0.2
├─ is-typedarray@1.0.0
├─ is-utf8@0.2.1
├─ isstream@0.1.2
├─ istanbul-api@1.3.7
├─ istanbul-lib-hook@1.2.2
├─ istanbul-lib-report@1.1.5
├─ istanbul-lib-source-maps@1.2.6
├─ istanbul-reports@1.5.1
├─ jest-changed-files@23.4.2
├─ jest-cli@23.6.0
├─ jest-each@23.6.0
├─ jest-environment-node@23.4.0
├─ jest-leak-detector@23.6.0
├─ jest-resolve-dependencies@23.6.0
├─ jest-runner@23.6.0
├─ jest-watcher@23.4.0
├─ jest@23.6.0
├─ jsdom@11.12.0
├─ json-schema-traverse@0.4.1
├─ json-schema@0.2.3
├─ json-stringify-safe@5.0.1
├─ jsprim@1.4.1
├─ kleur@2.0.2
├─ left-pad@1.3.0
├─ leven@2.1.0
├─ levn@0.3.0
├─ metro-babel7-plugin-react-transform@0.51.1
├─ metro-react-native-babel-preset@0.51.1
├─ natural-compare@1.4.0
├─ nwsapi@2.0.9
├─ oauth-sign@0.9.0
├─ object.getownpropertydescriptors@2.0.3
├─ optionator@0.8.2
├─ parse5@4.0.0
├─ performance-now@2.1.0
├─ pinkie@2.0.4
├─ pn@1.1.0
├─ prompts@0.1.14
├─ psl@1.1.31
├─ qs@6.5.2
├─ react-is@16.7.0
├─ react-test-renderer@16.6.3
├─ repeating@2.0.1
├─ request-promise-core@1.1.1
├─ request-promise-native@1.0.5
├─ request@2.88.0
├─ resolve-cwd@2.0.0
├─ sisteransi@0.1.1
├─ sshpk@1.16.0
├─ stack-utils@1.0.2
├─ stealthy-require@1.1.1
├─ symbol-tree@3.2.2
├─ test-exclude@4.2.3
├─ tough-cookie@2.5.0
├─ tunnel-agent@0.6.0
├─ tweetnacl@0.14.5
├─ uglify-js@3.4.9
├─ uri-js@4.2.2
├─ util.promisify@1.0.0
├─ verror@1.10.0
├─ w3c-hr-time@1.0.1
├─ whatwg-encoding@1.0.5
├─ whatwg-mimetype@2.3.0
├─ whatwg-url@6.5.0
├─ xml-name-validator@3.0.0
└─ yargs-parser@9.0.2
✨ Done in 14.14s.
To run your app on iOS:
cd /Users/joy/ReactNative/AwesomeProject
react-native run-ios
- or -
Open ios/AwesomeProject.xcodeproj in Xcode
Hit the Run button
To run your app on Android:
cd /Users/joy/ReactNative/AwesomeProject
Have an Android emulator running (quickest way to get started), or a device connected
react-native run-android
➜ ReactNative cd AwesomeProject
➜ AwesomeProject react-native run-ios
-------------本文结束感谢您的阅读-------------

本文作者:乔羽 / FightingJoey

发布时间:2019年01月15日 - 19:35

最后更新:2019年01月15日 - 20:34

原始链接:https://fightingjoey.github.io/2019/01/15/记录/ReactNative环境搭建/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

坚持原创技术分享,您的支持将鼓励我继续创作!