最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

[记录]折腾React Native

React Native crifan 1318浏览 0评论

参考一堆资料:

React Native | A framework for building native apps using React

Getting Started – React Native | A framework for building native apps using React

Homebrew — OS X 不可或缺的套件管理器

licrifandeMacBook-Pro:ReactiveNative crifan$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/…
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man8
==> The following directories will have their owner set to crifan:
/usr/local/.
/usr/local/bin
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man8
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man8

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man8
Password:
==> /usr/bin/sudo /usr/sbin/chown crifan /usr/local/. /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man8
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man8
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown crifan /Library/Caches/Homebrew
==> Downloading and installing Homebrew…
remote: Counting objects: 3937, done.
remote: Compressing objects: 100% (3780/3780), done.
remote: Total 3937 (delta 34), reused 2167 (delta 22), pack-reused 0
Receiving objects: 100% (3937/3937), 3.43 MiB | 1.90 MiB/s, done.
Resolving deltas: 100% (34/34), done.
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at e72bcfa ansible: update 2.0.0.1 bottle.
==> Installation successful!
==> Next steps
Run `brew help` to get started
licrifandeMacBook-Pro:ReactiveNative crifan$ brew help
Example usage:
  brew [info | home | options ] [FORMULA…]
  brew install FORMULA…
  brew uninstall FORMULA…
  brew search [foo]
  brew list [FORMULA…]
  brew update
  brew upgrade [FORMULA…]
  brew pin/unpin [FORMULA…]

Troubleshooting:
  brew doctor
  brew install -vd FORMULA
  brew [–env | config]

Brewing:
  brew create [URL [–no-fetch]]
  brew edit [FORMULA…]
  https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md

Further help:
  man brew
  brew home

licrifandeMacBook-Pro:ReactiveNative crifan$

creationix/nvm

Node.js

[未解决]Mac中安装NVM后无法运行

继续:

licrifandeMacBook-Pro:~ crifan$ nvm
-bash: nvm: command not found
licrifandeMacBook-Pro:~ crifan$ source ~/.nvm/nvm.sh
licrifandeMacBook-Pro:~ crifan$ nvm install node && nvm alias default node
Downloading https://nodejs.org/dist/v5.4.1/node-v5.4.1-darwin-x64.tar.gz
######################################################################## 100.0%
WARNING: checksums are currently disabled for node.js v4.0 and later
Now using node v5.4.1 (npm v3.3.12)
default -> node (-> v5.4.1)
licrifandeMacBook-Pro:~ crifan$ no
node                             nohup                            notifyd
node_version_has_solaris_binary  nologin                          notifyutil
licrifandeMacBook-Pro:~ crifan$ node –help
Usage: node [options] [ -e script | script.js ] [arguments]
       node debug script.js [arguments]

Options:
  -v, –version         print Node.js version
  -e, –eval script     evaluate script
  -p, –print           evaluate script and print result
  -c, –check           syntax check script without executing
  -i, –interactive     always enter the REPL even if stdin
                        does not appear to be a terminal
  -r, –require         module to preload (option can be repeated)
  –no-deprecation      silence deprecation warnings
  –throw-deprecation   throw an exception anytime a deprecated function is used
  –trace-deprecation   show stack traces on deprecations
  –trace-sync-io       show stack trace when use of sync IO
                        is detected after the first tick
  –track-heap-objects  track heap object allocations for heap snapshots
  –prof-process        process v8 profiler output generated
                        using –prof
  –v8-options          print v8 command line options
  –tls-cipher-list=val use an alternative default TLS cipher list
  –icu-data-dir=dir    set ICU data load path to dir
                        (overrides NODE_ICU_DATA)

Environment variables:
NODE_PATH               ‘:’-separated list of directories
                        prefixed to the module search path.
NODE_DISABLE_COLORS     set to 1 to disable colors in the REPL
NODE_ICU_DATA           data path for ICU (Intl object) data
NODE_REPL_HISTORY       path to the persistent REPL history file

Documentation can be found at https://nodejs.org/

然后去安装npm 2:

licrifandeMacBook-Pro:~ crifan$ npm install -g npm@2
/Users/crifan/.nvm/versions/node/v5.4.1/bin/npm -> /Users/crifan/.nvm/versions/node/v5.4.1/lib/node_modules/npm/bin/npm-cli.js
– abbrev@1.0.7 node_modules/npm/node_modules/abbrev
– ansi-regex@2.0.0 node_modules/npm/node_modules/ansi-regex
– ansicolors@0.3.2 node_modules/npm/node_modules/ansicolors
– ansistyles@0.1.3 node_modules/npm/node_modules/ansistyles
– aproba@1.0.1 node_modules/npm/node_modules/aproba
– archy@1.0.0 node_modules/npm/node_modules/archy
– chownr@1.0.1 node_modules/npm/node_modules/chownr
– graceful-fs@3.0.8 node_modules/npm/node_modules/cmd-shim/node_modules/graceful-fs
– clone@0.1.19 node_modules/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone
– defaults@1.0.2 node_modules/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults
– wcwidth@1.0.0 node_modules/npm/node_modules/columnify/node_modules/wcwidth
– proto-list@1.2.4 node_modules/npm/node_modules/config-chain/node_modules/proto-list
– debuglog@1.0.1 node_modules/npm/node_modules/debuglog
– asap@2.0.3 node_modules/npm/node_modules/dezalgo/node_modules/asap
– editor@1.0.0 node_modules/npm/node_modules/editor
– balanced-match@0.2.0 node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
– concat-map@0.0.1 node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map
– brace-expansion@1.1.1 node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion
– minimatch@2.0.10 node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch
– balanced-match@0.2.0 node_modules/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
– concat-map@0.0.1 node_modules/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map
– brace-expansion@1.1.1 node_modules/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion
– minimatch@3.0.0 node_modules/npm/node_modules/glob/node_modules/minimatch
– path-is-absolute@1.0.0 node_modules/npm/node_modules/glob/node_modules/path-is-absolute
– graceful-fs@4.1.2 node_modules/npm/node_modules/graceful-fs
– has-unicode@1.0.1 node_modules/npm/node_modules/has-unicode
– hosted-git-info@2.1.4 node_modules/npm/node_modules/hosted-git-info
– iferr@0.1.5 node_modules/npm/node_modules/iferr
– fs-write-stream-atomic@1.0.5 node_modules/npm/node_modules/fs-write-stream-atomic
– inherits@2.0.1 node_modules/npm/node_modules/inherits
– ini@1.3.4 node_modules/npm/node_modules/ini
– config-chain@1.1.9 node_modules/npm/node_modules/config-chain
– lockfile@1.0.1 node_modules/npm/node_modules/lockfile
– lodash._baseindexof@3.1.0 node_modules/npm/node_modules/lodash._baseindexof
– lodash._bindcallback@3.0.1 node_modules/npm/node_modules/lodash._bindcallback
– lodash._cacheindexof@3.0.2 node_modules/npm/node_modules/lodash._cacheindexof
– lodash._getnative@3.9.1 node_modules/npm/node_modules/lodash._getnative
– lodash._createcache@3.1.2 node_modules/npm/node_modules/lodash._createcache
– lodash._baseuniq@3.0.3 node_modules/npm/node_modules/lodash._baseuniq
– lodash._arraycopy@3.0.0 node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._arraycopy
– lodash._arrayeach@3.0.0 node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._arrayeach
– lodash._basecopy@3.0.1 node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._baseassign/node_modules/lodash._basecopy
– lodash._basefor@3.0.2 node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._basefor
– lodash.isarguments@3.0.4 node_modules/npm/node_modules/lodash.isarguments
– lodash.isarray@3.0.4 node_modules/npm/node_modules/lodash.isarray
– lodash.keys@3.1.2 node_modules/npm/node_modules/lodash.keys
– lodash._baseassign@3.2.0 node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._baseassign
– lodash._baseclone@3.3.0 node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone
– lodash.clonedeep@3.0.2 node_modules/npm/node_modules/lodash.clonedeep
– lodash.restparam@3.6.1 node_modules/npm/node_modules/lodash.restparam
– lodash._baseflatten@3.1.4 node_modules/npm/node_modules/lodash.union/node_modules/lodash._baseflatten
– lodash.union@3.1.0 node_modules/npm/node_modules/lodash.union
– lodash.istypedarray@3.0.2 node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash._baseisequal/node_modules/lodash.istypedarray
– lodash._baseisequal@3.0.7 node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash._baseisequal
– lodash.pairs@3.0.1 node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash.pairs
– lodash._basecallback@3.3.1 node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback
– lodash._isiterateecall@3.0.9 node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._isiterateecall
– lodash.uniq@3.2.2 node_modules/npm/node_modules/lodash.uniq
– lodash._basedifference@3.0.3 node_modules/npm/node_modules/lodash.without/node_modules/lodash._basedifference
– lodash.without@3.2.1 node_modules/npm/node_modules/lodash.without
– minimist@0.0.8 node_modules/npm/node_modules/mkdirp/node_modules/minimist
– mkdirp@0.5.1 node_modules/npm/node_modules/mkdirp
– cmd-shim@2.0.1 node_modules/npm/node_modules/cmd-shim
– balanced-match@0.3.0 node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
– concat-map@0.0.1 node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map
– brace-expansion@1.1.2 node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion
– minimatch@2.0.10 node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch
– lru-cache@2.7.3 node_modules/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache
– sigmund@1.0.1 node_modules/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund
– minimatch@1.0.0 node_modules/npm/node_modules/node-gyp/node_modules/minimatch
– ms@0.7.1 node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms
– debug@2.2.0 node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug
– array-index@0.1.1 node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index
– path-array@1.0.0 node_modules/npm/node_modules/node-gyp/node_modules/path-array
– block-stream@0.0.8 node_modules/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream
– tar@1.0.3 node_modules/npm/node_modules/node-gyp/node_modules/tar
– nopt@3.0.6 node_modules/npm/node_modules/nopt
– normalize-git-url@3.0.1 node_modules/npm/node_modules/normalize-git-url
– builtin-modules@1.1.0 node_modules/npm/node_modules/normalize-package-data/node_modules/is-builtin-module/node_modules/builtin-modules
– is-builtin-module@1.0.0 node_modules/npm/node_modules/normalize-package-data/node_modules/is-builtin-module
– npm-cache-filename@1.0.2 node_modules/npm/node_modules/npm-cache-filename
– core-util-is@1.0.2 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is
– isarray@0.0.1 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray
– process-nextick-args@1.0.6 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args
– string_decoder@0.10.31 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder
– util-deprecate@1.0.2 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate
– readable-stream@2.0.4 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream
– typedarray@0.0.6 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray
– concat-stream@1.5.1 node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream
– npm-user-validate@0.1.2 node_modules/npm/node_modules/npm-user-validate
– ansi@0.3.0 node_modules/npm/node_modules/npmlog/node_modules/ansi
– delegates@0.1.0 node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates
– core-util-is@1.0.1 node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is
– isarray@0.0.1 node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray
– string_decoder@0.10.31 node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder
– readable-stream@1.1.13 node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream
– lodash._basetostring@3.0.1 node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring
– lodash.repeat@3.0.1 node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat
– lodash._createpadding@3.6.1 node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding
– lodash.pad@3.1.1 node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad
– lodash.padleft@3.1.1 node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft
– lodash.padright@3.1.1 node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright
– gauge@1.2.2 node_modules/npm/node_modules/npmlog/node_modules/gauge
– opener@1.4.1 node_modules/npm/node_modules/opener
– os-homedir@1.0.0 node_modules/npm/node_modules/osenv/node_modules/os-homedir
– os-tmpdir@1.0.1 node_modules/npm/node_modules/osenv/node_modules/os-tmpdir
– osenv@0.1.3 node_modules/npm/node_modules/osenv
– path-is-inside@1.0.1 node_modules/npm/node_modules/path-is-inside
– read-cmd-shim@1.0.1 node_modules/npm/node_modules/read-cmd-shim
– util-extend@1.0.1 node_modules/npm/node_modules/read-installed/node_modules/util-extend
– jju@1.2.1 node_modules/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju
– json-parse-helpfulerror@1.0.3 node_modules/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror
– mute-stream@0.0.5 node_modules/npm/node_modules/read/node_modules/mute-stream
– read@1.0.7 node_modules/npm/node_modules/read
– promzard@0.3.0 node_modules/npm/node_modules/init-package-json/node_modules/promzard
– are-we-there-yet@1.0.4 node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet
– npmlog@2.0.0 node_modules/npm/node_modules/npmlog
– readdir-scoped-modules@1.0.2 node_modules/npm/node_modules/readdir-scoped-modules
– read-package-tree@5.1.2 node_modules/npm/node_modules/read-package-tree
– aws-sign2@0.6.0 node_modules/npm/node_modules/request/node_modules/aws-sign2
– core-util-is@1.0.2 node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is
– isarray@0.0.1 node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray
– process-nextick-args@1.0.6 node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args
– string_decoder@0.10.31 node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder
– util-deprecate@1.0.2 node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate
– readable-stream@2.0.4 node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream
– bl@1.0.0 node_modules/npm/node_modules/request/node_modules/bl
– caseless@0.11.0 node_modules/npm/node_modules/request/node_modules/caseless
– delayed-stream@1.0.0 node_modules/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
– combined-stream@1.0.5 node_modules/npm/node_modules/request/node_modules/combined-stream
– extend@3.0.0 node_modules/npm/node_modules/request/node_modules/extend
– forever-agent@0.6.1 node_modules/npm/node_modules/request/node_modules/forever-agent
– async@1.5.0 node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async
– ansi-styles@2.1.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles
– escape-string-regexp@1.0.3 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp
– has-ansi@2.0.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi
– supports-color@2.0.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color
– graceful-readlink@1.0.1 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink
– commander@2.9.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/commander
– generate-function@2.0.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function
– is-property@1.0.2 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property
– generate-object-property@1.2.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property
– jsonpointer@2.0.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer
– xtend@4.0.1 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend
– is-my-json-valid@2.12.3 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid
– pinkie@2.0.1 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie
– pinkie-promise@2.0.0 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise
– hoek@2.16.3 node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek
– boom@2.10.1 node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom
– cryptiles@2.0.5 node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles
– sntp@1.0.9 node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp
– hawk@3.1.2 node_modules/npm/node_modules/request/node_modules/hawk
– asn1@0.1.11 node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1
– assert-plus@0.1.5 node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus
– ctype@0.5.3 node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype
– http-signature@1.1.0 node_modules/npm/node_modules/request/node_modules/http-signature
– isstream@0.1.2 node_modules/npm/node_modules/request/node_modules/isstream
– json-stringify-safe@5.0.1 node_modules/npm/node_modules/request/node_modules/json-stringify-safe
– mime-db@1.20.0 node_modules/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db
– mime-types@2.1.8 node_modules/npm/node_modules/request/node_modules/mime-types
– form-data@1.0.0-rc3 node_modules/npm/node_modules/request/node_modules/form-data
– node-uuid@1.4.7 node_modules/npm/node_modules/request/node_modules/node-uuid
– oauth-sign@0.8.0 node_modules/npm/node_modules/request/node_modules/oauth-sign
– qs@5.2.0 node_modules/npm/node_modules/request/node_modules/qs
– stringstream@0.0.5 node_modules/npm/node_modules/request/node_modules/stringstream
– tough-cookie@2.2.1 node_modules/npm/node_modules/request/node_modules/tough-cookie
– tunnel-agent@0.4.2 node_modules/npm/node_modules/request/node_modules/tunnel-agent
– retry@0.8.0 node_modules/npm/node_modules/retry
– semver@5.1.0 node_modules/npm/node_modules/semver
– npm-package-arg@4.1.0 node_modules/npm/node_modules/npm-package-arg
– npm-install-checks@1.0.6 node_modules/npm/node_modules/npm-install-checks
– core-util-is@1.0.1 node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/core-util-is
– isarray@0.0.1 node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/isarray
– process-nextick-args@1.0.3 node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/process-nextick-args
– string_decoder@0.10.31 node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder
– util-deprecate@1.0.1 node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/util-deprecate
– readable-stream@2.0.2 node_modules/npm/node_modules/sha/node_modules/readable-stream
– sha@2.0.1 node_modules/npm/node_modules/sha
– slide@1.1.6 node_modules/npm/node_modules/slide
– sorted-object@1.0.0 node_modules/npm/node_modules/sorted-object
– strip-ansi@3.0.0 node_modules/npm/node_modules/strip-ansi
– chalk@1.1.1 node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk
– har-validator@2.0.3 node_modules/npm/node_modules/request/node_modules/har-validator
– request@2.67.0 node_modules/npm/node_modules/request
– columnify@1.5.2 node_modules/npm/node_modules/columnify
– block-stream@0.0.8 node_modules/npm/node_modules/tar/node_modules/block-stream
– text-table@0.2.0 node_modules/npm/node_modules/text-table
– uid-number@0.0.6 node_modules/npm/node_modules/uid-number
– umask@1.1.0 node_modules/npm/node_modules/umask
– unique-slug@1.0.0 node_modules/npm/node_modules/unique-filename/node_modules/unique-slug
– unique-filename@1.0.0 node_modules/npm/node_modules/unique-filename
– unpipe@1.0.0 node_modules/npm/node_modules/unpipe
– spdx-exceptions@1.0.4 node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions
– spdx-license-ids@1.0.2 node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-license-ids
– spdx-expression-parse@1.0.2 node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse
– spdx-correct@1.0.2 node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct
– validate-npm-package-license@3.0.1 node_modules/npm/node_modules/validate-npm-package-license
– normalize-package-data@2.3.5 node_modules/npm/node_modules/normalize-package-data
– builtins@0.0.7 node_modules/npm/node_modules/validate-npm-package-name/node_modules/builtins
– validate-npm-package-name@2.2.2 node_modules/npm/node_modules/validate-npm-package-name
– is-relative@0.1.3 node_modules/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative
– is-absolute@0.1.7 node_modules/npm/node_modules/which/node_modules/is-absolute
– which@1.2.0 node_modules/npm/node_modules/which
– wrappy@1.0.1 node_modules/npm/node_modules/wrappy
– once@1.3.3 node_modules/npm/node_modules/once
– inflight@1.0.4 node_modules/npm/node_modules/inflight
– glob@4.5.3 node_modules/npm/node_modules/node-gyp/node_modules/glob
– glob@5.0.15 node_modules/npm/node_modules/glob
– rimraf@2.4.4 node_modules/npm/node_modules/rimraf
– npm-registry-client@7.0.9 node_modules/npm/node_modules/npm-registry-client
– fstream@1.0.8 node_modules/npm/node_modules/fstream
– tar@2.2.1 node_modules/npm/node_modules/tar
– node-gyp@3.2.1 node_modules/npm/node_modules/node-gyp
– fstream-ignore@1.0.3 node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore
– fstream-npm@1.0.7 node_modules/npm/node_modules/fstream-npm
– fs-vacuum@1.2.7 node_modules/npm/node_modules/fs-vacuum
– read-package-json@2.0.2 node_modules/npm/node_modules/read-package-json
– init-package-json@1.9.1 node_modules/npm/node_modules/init-package-json
– dezalgo@1.0.3 node_modules/npm/node_modules/dezalgo
– realize-package-specifier@3.0.1 node_modules/npm/node_modules/realize-package-specifier
– read-installed@4.0.3 node_modules/npm/node_modules/read-installed
– async-some@1.0.2 node_modules/npm/node_modules/async-some
– write-file-atomic@1.1.4 node_modules/npm/node_modules/write-file-atomic
/Users/crifan/.nvm/versions/node/v5.4.1/lib
└──
npm@2.14.15

licrifandeMacBook-Pro:~ crifan$
licrifandeMacBook-Pro:~ crifan$ brew install watchman
==> Installing dependencies for watchman: pcre
==> Installing watchman dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.38.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pcre-8.38.el_capitan.bottle.tar.gz
?  /usr/local/Cellar/pcre/8.38: 146 files, 5.4M
==> Installing watchman
==> Downloading https://homebrew.bintray.com/bottles/watchman-4.1.0.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring watchman-4.1.0.el_capitan.bottle.tar.gz
?  /usr/local/Cellar/watchman/4.1.0: 20 files, 265K
licrifandeMacBook-Pro:~ crifan$
licrifandeMacBook-Pro:~ crifan$ brew install flow
==> Downloading https://homebrew.bintray.com/bottles/flow-0.20.1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring flow-0.20.1.el_capitan.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
?  /usr/local/Cellar/flow/0.20.1: 6 files, 6.1M

licrifandeMacBook-Pro:~ crifan$
licrifandeMacBook-Pro:~ crifan$ brew update && brew upgrade
Updated Homebrew from e72bcfa to 9db5021.
==> New Formulae
acmetool                                gkrellm                                 txr                                  
==> Updated Formulae
artifactory         groonga             mongodb             poppler             sync_gateway        uwsgi            
awscli              gtksourceview3      mydumper            shadowsocks-libev   syncthing        
crystal-lang        keybase             node                slackcat            syncthing-inotify
diff-pdf            libcouchbase        osh                 sourcekitten        telegraf         
evince              lua                 pdf2htmlex          sshuttle            termshare        
go                  lua51               pond                swiftlint           tomcat-native    
==> Deleted Formulae
groonga-normalizer-mysql
licrifandeMacBook-Pro:~ crifan$ 
licrifandeMacBook-Pro:ReactiveNative crifan$ npm install -g react-native-cli
/Users/crifan/.nvm/versions/node/v5.4.1/bin/react-native -> /Users/crifan/.nvm/versions/node/v5.4.1/lib/node_modules/react-native-cli/index.js
react-native-cli@0.1.10 /Users/crifan/.nvm/versions/node/v5.4.1/lib/node_modules/react-native-cli
├── semver@5.1.0
├── chalk@1.1.1 (escape-string-regexp@1.0.4, ansi-styles@2.1.0, supports-color@2.0.0, strip-ansi@3.0.0, has-ansi@2.0.0)
└── prompt@0.2.14 (revalidator@0.1.8, pkginfo@0.3.1, read@1.0.7, winston@0.8.3, utile@0.2.1)
licrifandeMacBook-Pro:ReactiveNative crifan$ react-native init AwesomeProject
This will walk you through creating a new React Native project in /Users/crifan/dev/dev_root/ReactiveNative/AwesomeProject
Installing react-native package from npm…
Setting up new React Native app in /Users/crifan/dev/dev_root/ReactiveNative/AwesomeProject
To run your app on iOS:
   Open /Users/crifan/dev/dev_root/ReactiveNative/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/crifan/dev/dev_root/ReactiveNative/AwesomeProject
   react-native run-android
licrifandeMacBook-Pro:ReactiveNative crifan$

~/dev/dev_root/ReactiveNative/AwesomeProject/node_modules/react-native/packager ~
packager.sh: line 11: node: command not found
~
Process terminated. Press <enter> to close the window

估计是:

node没有运行起来,导致无法正常连接服务器。。

无法运行iOS的app

抽空再继续折腾。。

【后记1】

后来的后来,估计是rn自己对于环境的支持也变的更好了,然后新版就可以顺利的运行了:

【记录】折腾React Native iOS

转载请注明:在路上 » [记录]折腾React Native

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
72 queries in 0.101 seconds, using 19.01MB memory