Cordova 3.1.0:命令行界面不起作用。我安装了 node.js 并使用了以下命令
$ sudo npm install -g cordova
安装后得到以下输出:
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
cordova@3.1.0-0.2.0 /usr/local/lib/node_modules/cordova
├── ncallbacks@1.0.0
├── semver@1.1.0
├── colors@0.6.2
├── open@0.0.3
├── mime@1.2.11
├── q@0.9.7
├── shelljs@0.1.2
├── follow-redirects@0.0.3 (underscore@1.5.2)
├── optimist@0.6.0 (wordwrap@0.0.2, minimist@0.0.5)
├── xcode@0.5.1 (node-uuid@1.3.3, pegjs@0.6.2)
├── glob@3.2.6 (inherits@2.0.1, minimatch@0.2.12)
├── tar@0.1.18 (inherits@2.0.1, block-stream@0.0.7, fstream@0.1.24)
├── elementtree@0.1.5 (sax@0.3.5)
├── prompt@0.2.7 (revalidator@0.1.5, pkginfo@0.3.0, read@1.0.5, utile@0.1.7, winston@0.6.2)
├── express@3.0.0 (methods@0.0.1, fresh@0.1.0, range-parser@0.0.4, debug@0.7.3, cookie@0.0.4, crc@0.2.0, commander@0.6.1, mkdirp@0.3.3, send@0.1.0, connect@2.6.0)
├── request@2.22.0 (json-stringify-safe@4.0.0, aws-sign@0.3.0, forever-agent@0.5.0, qs@0.6.5, tunnel-agent@0.3.0, oauth-sign@0.3.0, cookie-jar@0.3.0, node-uuid@1.4.1, http-signature@0.10.0, hawk@0.13.1, form-data@0.0.8)
├── npm@1.3.13
├── plist@0.4.3 (xmlbuilder@0.4.2, xmldom@0.1.16)
├── ripple-emulator@0.9.18 (connect-xcors@0.5.2, colors@0.6.0-1, accounting@0.3.2, request@2.12.0, moment@1.7.2, express@3.1.0)
└── plugman@0.14.0 (ncallbacks@1.1.0, osenv@0.0.3, bplist-parser@0.0.4, semver@2.0.11, underscore@1.4.4, nopt@1.0.10, dep-graph@1.1.0, xcode@0.6.1, rc@0.3.0, tar.gz@0.1.1, npm@1.3.4)
无法创建添加平台或创建项目。
使用此命令时
$ cordova create hello com.example.hello HelloWorld
我收到以下错误。
-bash: cordova: command not found
我正在使用 MAC 操作系统