react native创建项目

跟風遠走 提交于 2019-12-10 08:34:44

Last login: Thu May 19 11:36:03 on ttys004
zcldeMacBook-Air:~ zcl$ nvm

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

Usage:
  nvm --help                                Show this message
  nvm --version                             Print out the latest released version of nvm
  nvm install [-s] <version>                Download and install a <version>, [-s] from source. Uses .nvmrc if available
    --reinstall-packages-from=<version>     When installing, reinstall packages installed in <node|iojs|node version number>
  nvm uninstall <version>                   Uninstall a version
  nvm use [--silent] <version>              Modify PATH to use <version>. Uses .nvmrc if available
  nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
  nvm run [--silent] <version> [<args>]     Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
  nvm current                               Display currently activated version
  nvm ls                                    List installed versions
  nvm ls <version>                          List versions matching a given description
  nvm ls-remote                             List remote versions available for install
  nvm version <version>                     Resolve the given description to a single local version
  nvm version-remote <version>              Resolve the given description to a single remote version
  nvm deactivate                            Undo effects of `nvm` on current shell
  nvm alias [<pattern>]                     Show all aliases beginning with <pattern>
  nvm alias <name> <version>                Set an alias named <name> pointing to <version>
  nvm unalias <name>                        Deletes the alias named <name>
  nvm reinstall-packages <version>          Reinstall global `npm` packages contained in <version> to current version
  nvm unload                                Unload `nvm` from shell
  nvm which [<version>]                     Display path to installed node version. Uses .nvmrc if available

Example:
  nvm install v0.10.32                  Install a specific version number
  nvm use 0.10                          Use the latest available 0.10.x release
  nvm run 0.10.32 app.js                Run app.js using node v0.10.32
  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32
  nvm alias default 0.10.32             Set default node version on a shell

Note:
  to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)

zcldeMacBook-Air:~ zcl$ nvm -v

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

Usage:
  nvm --help                                Show this message
  nvm --version                             Print out the latest released version of nvm
  nvm install [-s] <version>                Download and install a <version>, [-s] from source. Uses .nvmrc if available
    --reinstall-packages-from=<version>     When installing, reinstall packages installed in <node|iojs|node version number>
  nvm uninstall <version>                   Uninstall a version
  nvm use [--silent] <version>              Modify PATH to use <version>. Uses .nvmrc if available
  nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
  nvm run [--silent] <version> [<args>]     Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
  nvm current                               Display currently activated version
  nvm ls                                    List installed versions
  nvm ls <version>                          List versions matching a given description
  nvm ls-remote                             List remote versions available for install
  nvm version <version>                     Resolve the given description to a single local version
  nvm version-remote <version>              Resolve the given description to a single remote version
  nvm deactivate                            Undo effects of `nvm` on current shell
  nvm alias [<pattern>]                     Show all aliases beginning with <pattern>
  nvm alias <name> <version>                Set an alias named <name> pointing to <version>
  nvm unalias <name>                        Deletes the alias named <name>
  nvm reinstall-packages <version>          Reinstall global `npm` packages contained in <version> to current version
  nvm unload                                Unload `nvm` from shell
  nvm which [<version>]                     Display path to installed node version. Uses .nvmrc if available

Example:
  nvm install v0.10.32                  Install a specific version number
  nvm use 0.10                          Use the latest available 0.10.x release
  nvm run 0.10.32 app.js                Run app.js using node v0.10.32
  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32
  nvm alias default 0.10.32             Set default node version on a shell

Note:
  to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)

zcldeMacBook-Air:~ zcl$ nvm-v
-bash: nvm-v: command not found
zcldeMacBook-Air:~ zcl$ nvm -v

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

Usage:
  nvm --help                                Show this message
  nvm --version                             Print out the latest released version of nvm
  nvm install [-s] <version>                Download and install a <version>, [-s] from source. Uses .nvmrc if available
    --reinstall-packages-from=<version>     When installing, reinstall packages installed in <node|iojs|node version number>
  nvm uninstall <version>                   Uninstall a version
  nvm use [--silent] <version>              Modify PATH to use <version>. Uses .nvmrc if available
  nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
  nvm run [--silent] <version> [<args>]     Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
  nvm current                               Display currently activated version
  nvm ls                                    List installed versions
  nvm ls <version>                          List versions matching a given description
  nvm ls-remote                             List remote versions available for install
  nvm version <version>                     Resolve the given description to a single local version
  nvm version-remote <version>              Resolve the given description to a single remote version
  nvm deactivate                            Undo effects of `nvm` on current shell
  nvm alias [<pattern>]                     Show all aliases beginning with <pattern>
  nvm alias <name> <version>                Set an alias named <name> pointing to <version>
  nvm unalias <name>                        Deletes the alias named <name>
  nvm reinstall-packages <version>          Reinstall global `npm` packages contained in <version> to current version
  nvm unload                                Unload `nvm` from shell
  nvm which [<version>]                     Display path to installed node version. Uses .nvmrc if available

Example:
  nvm install v0.10.32                  Install a specific version number
  nvm use 0.10                          Use the latest available 0.10.x release
  nvm run 0.10.32 app.js                Run app.js using node v0.10.32
  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32
  nvm alias default 0.10.32             Set default node version on a shell

Note:
  to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)

zcldeMacBook-Air:~ zcl$ nvm install node && nvm alias default node
Downloading https://nodejs.org/dist/v6.2.0/node-v6.2.0-darwin-x64.tar.gz...
######################################################################## 100.0%
Now using node v6.2.0 (npm v3.8.9)
Creating default alias: default -> node (-> v6.2.0)
default -> node (-> v6.2.0)
zcldeMacBook-Air:~ zcl$ node -v
v6.2.0
zcldeMacBook-Air:~ zcl$ npm -v
3.8.9
zcldeMacBook-Air:~ zcl$ brew install watchman
Warning: watchman-HEAD already installed
zcldeMacBook-Air:~ zcl$ watchman
{
    "error": "invalid command (expected an array with some elements!)",
    "cli_validated": true,
    "version": "4.5.0"
}
zcldeMacBook-Air:~ zcl$ watchman -v
4.5.0
zcldeMacBook-Air:~ zcl$ flow -v
flow: unknown option '-v'.
Usage: flow [COMMAND]

Valid values for COMMAND:
  ast             Print the AST
  autocomplete    Queries autocompletion information
  check           Does a full Flow check and prints the results
  check-contents  Run typechecker on contents from stdin
  coverage        Shows coverage information for a given file
  find-module     Resolves a module reference to a file
  force-recheck   Forces the server to recheck a given list of files
  get-def         Gets the definition location of a variable or property
  get-importers   Gets a list of all importers for one or more given modules
  get-imports     Get names of all modules imported by one or more given modules
  init            Initializes a directory to be used as a flow root directory
  port            Shows ported type annotations for given files
  search          Searches a pattern
  server          Runs a Flow server in the foreground
  start           Starts a Flow server
  status          (default) Shows current Flow errors by asking the Flow server
  stop            Stops a Flow server
  suggest         Shows type annotation suggestions for given files
  type-at-pos     Shows the type at a given file and position
  version         Print version information

Default values if unspecified:
  COMMAND    status

Status command options:
  --color              Display terminal output in color. never, always, auto (default: auto)
  --from               Specify client (for use by editor plugins)
  --help               This list of options
  --ignore-version     Ignore the version constraint in .flowconfig
  --json               Output results in JSON format
  --no-auto-start      If the server is not running, do not start it; just exit
  --old-output-format  Use old output format (absolute file names, line and column numbers)
  --one-line           Escapes newlines so that each error prints on one line
  --retries            Set the number of retries. (default: 3)
  --retry-if-init      retry if the server is initializing (default: true)
  --show-all-errors    Print all errors (the default is to truncate after 50 errors)
  --strip-root         Print paths without the root
  --temp-dir           Directory in which to store temp files (default: /tmp/flow/)
  --timeout            Maximum time to wait, in seconds
  --version            (Deprecated, use `flow version` instead) Print version number and exit
zcldeMacBook-Air:~ zcl$ npm install -g react-native-cli
/Users/zcl/.nvm/versions/node/v6.2.0/bin/react-native -> /Users/zcl/.nvm/versions/node/v6.2.0/lib/node_modules/react-native-cli/index.js
/Users/zcl/.nvm/versions/node/v6.2.0/lib
└─┬ react-native-cli@0.2.0
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
  │ ├─┬ has-ansi@2.0.0
  │ │ └── ansi-regex@2.0.0
  │ ├── strip-ansi@3.0.1
  │ └── supports-color@2.0.0
  ├── minimist@1.2.0
  ├─┬ prompt@0.2.14
  │ ├── pkginfo@0.4.0
  │ ├─┬ read@1.0.7
  │ │ └── mute-stream@0.0.6
  │ ├── revalidator@0.1.8
  │ ├─┬ utile@0.2.1
  │ │ ├── async@0.2.10
  │ │ ├── deep-equal@1.0.1
  │ │ ├── i@0.3.5
│ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ ├── ncp@0.4.2
  │ │ └─┬ rimraf@2.5.2
  │ │   └─┬ glob@7.0.3
  │ │     ├─┬ inflight@1.0.5
  │ │     │ └── wrappy@1.0.2
  │ │     ├── inherits@2.0.1
  │ │     ├─┬ minimatch@3.0.0
  │ │     │ └─┬ brace-expansion@1.1.4
  │ │     │   ├── balanced-match@0.4.1
  │ │     │   └── concat-map@0.0.1
  │ │     ├── once@1.3.3
  │ │     └── path-is-absolute@1.0.0
  │ └─┬ winston@0.8.3
  │   ├── colors@0.6.2
  │   ├── cycle@1.0.3
  │   ├── eyes@0.1.8
  │   ├── isstream@0.1.2
  │   ├── pkginfo@0.3.1
  │   └── stack-trace@0.0.9
  └── semver@5.1.0

zcldeMacBook-Air:~ zcl$ LS
360云盘            Library            myapp
AndroidStudioProjects    Movies            webapp
Desktop            Music            百度云同步盘
Documents        Pictures
Downloads        Public
zcldeMacBook-Air:~ zcl$ cd Desktop/
zcldeMacBook-Air:Desktop zcl$ mkdir ReactNative
zcldeMacBook-Air:Desktop zcl$ cd ReactNative/
zcldeMacBook-Air:ReactNative zcl$ react-native init  HelloWorld --verbose
This will walk you through creating a new React Native project in /Users/zcl/Desktop/ReactNative/HelloWorld
Installing react-native package from npm...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!