最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[记录]折腾React Native

React Native crifan 2925浏览 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
[email protected] node_modules/npm/node_modules/abbrev
[email protected] node_modules/npm/node_modules/ansi-regex
[email protected] node_modules/npm/node_modules/ansicolors
[email protected] node_modules/npm/node_modules/ansistyles
[email protected] node_modules/npm/node_modules/aproba
[email protected] node_modules/npm/node_modules/archy
[email protected] node_modules/npm/node_modules/chownr
[email protected] node_modules/npm/node_modules/cmd-shim/node_modules/graceful-fs
[email protected] node_modules/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone
[email protected] node_modules/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults
[email protected] node_modules/npm/node_modules/columnify/node_modules/wcwidth
[email protected] node_modules/npm/node_modules/config-chain/node_modules/proto-list
[email protected] node_modules/npm/node_modules/debuglog
[email protected] node_modules/npm/node_modules/dezalgo/node_modules/asap
[email protected] node_modules/npm/node_modules/editor
[email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
[email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map
[email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion
[email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch
[email protected] node_modules/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
[email protected] node_modules/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map
[email protected] node_modules/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion
[email protected] node_modules/npm/node_modules/glob/node_modules/minimatch
[email protected] node_modules/npm/node_modules/glob/node_modules/path-is-absolute
[email protected] node_modules/npm/node_modules/graceful-fs
[email protected] node_modules/npm/node_modules/has-unicode
[email protected] node_modules/npm/node_modules/hosted-git-info
[email protected] node_modules/npm/node_modules/iferr
[email protected] node_modules/npm/node_modules/fs-write-stream-atomic
[email protected] node_modules/npm/node_modules/inherits
[email protected] node_modules/npm/node_modules/ini
[email protected] node_modules/npm/node_modules/config-chain
[email protected] node_modules/npm/node_modules/lockfile
[email protected] node_modules/npm/node_modules/lodash._baseindexof
[email protected] node_modules/npm/node_modules/lodash._bindcallback
[email protected] node_modules/npm/node_modules/lodash._cacheindexof
[email protected] node_modules/npm/node_modules/lodash._getnative
[email protected] node_modules/npm/node_modules/lodash._createcache
[email protected] node_modules/npm/node_modules/lodash._baseuniq
[email protected] node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._arraycopy
[email protected] node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._arrayeach
[email protected] node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._baseassign/node_modules/lodash._basecopy
[email protected] node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._basefor
[email protected] node_modules/npm/node_modules/lodash.isarguments
[email protected] node_modules/npm/node_modules/lodash.isarray
[email protected] node_modules/npm/node_modules/lodash.keys
[email protected] node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone/node_modules/lodash._baseassign
[email protected] node_modules/npm/node_modules/lodash.clonedeep/node_modules/lodash._baseclone
[email protected] node_modules/npm/node_modules/lodash.clonedeep
[email protected] node_modules/npm/node_modules/lodash.restparam
[email protected] node_modules/npm/node_modules/lodash.union/node_modules/lodash._baseflatten
[email protected] node_modules/npm/node_modules/lodash.union
[email protected] node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash._baseisequal/node_modules/lodash.istypedarray
[email protected] node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash._baseisequal
[email protected] node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback/node_modules/lodash.pairs
[email protected] node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._basecallback
[email protected] node_modules/npm/node_modules/lodash.uniq/node_modules/lodash._isiterateecall
[email protected] node_modules/npm/node_modules/lodash.uniq
[email protected] node_modules/npm/node_modules/lodash.without/node_modules/lodash._basedifference
[email protected] node_modules/npm/node_modules/lodash.without
[email protected] node_modules/npm/node_modules/mkdirp/node_modules/minimist
[email protected] node_modules/npm/node_modules/mkdirp
[email protected] node_modules/npm/node_modules/cmd-shim
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/glob/node_modules/minimatch
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/minimatch/node_modules/sigmund
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/minimatch
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug/node_modules/ms
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/debug
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/path-array
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/tar
[email protected] node_modules/npm/node_modules/nopt
[email protected] node_modules/npm/node_modules/normalize-git-url
[email protected] node_modules/npm/node_modules/normalize-package-data/node_modules/is-builtin-module/node_modules/builtin-modules
[email protected] node_modules/npm/node_modules/normalize-package-data/node_modules/is-builtin-module
[email protected] node_modules/npm/node_modules/npm-cache-filename
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/core-util-is
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/string_decoder
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/util-deprecate
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/typedarray
[email protected] node_modules/npm/node_modules/npm-registry-client/node_modules/concat-stream
[email protected] node_modules/npm/node_modules/npm-user-validate
[email protected] node_modules/npm/node_modules/npmlog/node_modules/ansi
[email protected] node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates
[email protected] node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is
[email protected] node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray
[email protected] node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder
[email protected] node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream
[email protected] node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._basetostring
[email protected] node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding/node_modules/lodash.repeat
[email protected] node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash._createpadding
[email protected] node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad
[email protected] node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft
[email protected] node_modules/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright
[email protected] node_modules/npm/node_modules/npmlog/node_modules/gauge
[email protected] node_modules/npm/node_modules/opener
[email protected] node_modules/npm/node_modules/osenv/node_modules/os-homedir
[email protected] node_modules/npm/node_modules/osenv/node_modules/os-tmpdir
[email protected] node_modules/npm/node_modules/osenv
[email protected] node_modules/npm/node_modules/path-is-inside
[email protected] node_modules/npm/node_modules/read-cmd-shim
[email protected] node_modules/npm/node_modules/read-installed/node_modules/util-extend
[email protected] node_modules/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju
[email protected] node_modules/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror
[email protected] node_modules/npm/node_modules/read/node_modules/mute-stream
[email protected] node_modules/npm/node_modules/read
[email protected] node_modules/npm/node_modules/init-package-json/node_modules/promzard
[email protected] node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet
[email protected] node_modules/npm/node_modules/npmlog
[email protected] node_modules/npm/node_modules/readdir-scoped-modules
[email protected] node_modules/npm/node_modules/read-package-tree
[email protected] node_modules/npm/node_modules/request/node_modules/aws-sign2
[email protected] node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is
[email protected] node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray
[email protected] node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args
[email protected] node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder
[email protected] node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate
[email protected] node_modules/npm/node_modules/request/node_modules/bl/node_modules/readable-stream
[email protected] node_modules/npm/node_modules/request/node_modules/bl
[email protected] node_modules/npm/node_modules/request/node_modules/caseless
[email protected] node_modules/npm/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream
[email protected] node_modules/npm/node_modules/request/node_modules/combined-stream
[email protected] node_modules/npm/node_modules/request/node_modules/extend
[email protected] node_modules/npm/node_modules/request/node_modules/forever-agent
[email protected] node_modules/npm/node_modules/request/node_modules/form-data/node_modules/async
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/commander
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function
[email protected] 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
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise/node_modules/pinkie
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/pinkie-promise
[email protected] node_modules/npm/node_modules/request/node_modules/hawk/node_modules/hoek
[email protected] node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom
[email protected] node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles
[email protected] node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp
[email protected] node_modules/npm/node_modules/request/node_modules/hawk
[email protected] node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/asn1
[email protected] node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus
[email protected] node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/ctype
[email protected] node_modules/npm/node_modules/request/node_modules/http-signature
[email protected] node_modules/npm/node_modules/request/node_modules/isstream
[email protected] node_modules/npm/node_modules/request/node_modules/json-stringify-safe
[email protected] node_modules/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db
[email protected] node_modules/npm/node_modules/request/node_modules/mime-types
[email protected] node_modules/npm/node_modules/request/node_modules/form-data
[email protected] node_modules/npm/node_modules/request/node_modules/node-uuid
[email protected] node_modules/npm/node_modules/request/node_modules/oauth-sign
[email protected] node_modules/npm/node_modules/request/node_modules/qs
[email protected] node_modules/npm/node_modules/request/node_modules/stringstream
[email protected] node_modules/npm/node_modules/request/node_modules/tough-cookie
[email protected] node_modules/npm/node_modules/request/node_modules/tunnel-agent
[email protected] node_modules/npm/node_modules/retry
[email protected] node_modules/npm/node_modules/semver
[email protected] node_modules/npm/node_modules/npm-package-arg
[email protected] node_modules/npm/node_modules/npm-install-checks
[email protected] node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/core-util-is
[email protected] node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/isarray
[email protected] node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/process-nextick-args
[email protected] node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/string_decoder
[email protected] node_modules/npm/node_modules/sha/node_modules/readable-stream/node_modules/util-deprecate
[email protected] node_modules/npm/node_modules/sha/node_modules/readable-stream
[email protected] node_modules/npm/node_modules/sha
[email protected] node_modules/npm/node_modules/slide
[email protected] node_modules/npm/node_modules/sorted-object
[email protected] node_modules/npm/node_modules/strip-ansi
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator/node_modules/chalk
[email protected] node_modules/npm/node_modules/request/node_modules/har-validator
[email protected] node_modules/npm/node_modules/request
[email protected] node_modules/npm/node_modules/columnify
[email protected] node_modules/npm/node_modules/tar/node_modules/block-stream
[email protected] node_modules/npm/node_modules/text-table
[email protected] node_modules/npm/node_modules/uid-number
[email protected] node_modules/npm/node_modules/umask
[email protected] node_modules/npm/node_modules/unique-filename/node_modules/unique-slug
[email protected] node_modules/npm/node_modules/unique-filename
[email protected] node_modules/npm/node_modules/unpipe
[email protected] node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/node_modules/spdx-exceptions
[email protected] node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-license-ids
[email protected] node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse
[email protected] node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-correct
[email protected] node_modules/npm/node_modules/validate-npm-package-license
[email protected] node_modules/npm/node_modules/normalize-package-data
[email protected] node_modules/npm/node_modules/validate-npm-package-name/node_modules/builtins
[email protected] node_modules/npm/node_modules/validate-npm-package-name
[email protected] node_modules/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative
[email protected] node_modules/npm/node_modules/which/node_modules/is-absolute
[email protected] node_modules/npm/node_modules/which
[email protected] node_modules/npm/node_modules/wrappy
[email protected] node_modules/npm/node_modules/once
[email protected] node_modules/npm/node_modules/inflight
[email protected] node_modules/npm/node_modules/node-gyp/node_modules/glob
[email protected] node_modules/npm/node_modules/glob
[email protected] node_modules/npm/node_modules/rimraf
[email protected] node_modules/npm/node_modules/npm-registry-client
[email protected] node_modules/npm/node_modules/fstream
[email protected] node_modules/npm/node_modules/tar
[email protected] node_modules/npm/node_modules/node-gyp
[email protected] node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore
[email protected] node_modules/npm/node_modules/fstream-npm
[email protected] node_modules/npm/node_modules/fs-vacuum
[email protected] node_modules/npm/node_modules/read-package-json
[email protected] node_modules/npm/node_modules/init-package-json
[email protected] node_modules/npm/node_modules/dezalgo
[email protected] node_modules/npm/node_modules/realize-package-specifier
[email protected] node_modules/npm/node_modules/read-installed
[email protected] node_modules/npm/node_modules/async-some
[email protected] node_modules/npm/node_modules/write-file-atomic
/Users/crifan/.nvm/versions/node/v5.4.1/lib
└──
[email protected]

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
[email protected] /Users/crifan/.nvm/versions/node/v5.4.1/lib/node_modules/react-native-cli
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
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,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.193 seconds, using 22.19MB memory