当我尝试使用" sudo npm install -g cordova"安装Cordova CLI时,一切似乎都运行良好:
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
cordova@6.1.1 /usr/local/lib/node_modules/cordova
├── underscore@1.7.0
├── q@1.0.1
├── ansi@0.3.1
├── nopt@3.0.1 (abbrev@1.0.7)
├── update-notifier@0.5.0 (is-npm@1.0.0, string-length@1.0.1, repeating@1.1.3, semver-diff@2.1.0, chalk@1.1.3, configstore@1.4.0, latest-version@1.0.1)
├── cordova-common@1.2.0 (cordova-registry-mapper@1.1.15, unorm@1.4.1, underscore@1.8.3, q@1.4.1, semver@5.1.0, osenv@0.1.3, bplist-parser@0.1.1, shelljs@0.5.3, glob@5.0.15, elementtree@0.1.6, plist@1.2.0)
└── cordova-lib@6.1.1 (valid-identifier@0.0.1, opener@1.4.1, properties-parser@0.2.3, semver@4.3.6, nopt@3.0.6, dep-graph@1.1.0, shelljs@0.3.0, xcode@0.8.0, request@2.47.0, cordova-serve@1.0.0, aliasify@1.9.0, init-package-json@1.9.3, cordova-app-hello-world@3.10.0, tar@1.0.2, cordova-js@4.1.4, npm@2.15.5)
但我的系统信息保持不变:
Cordova CLI: Not installed
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.4.4
Xcode version: Xcode 7.3.1 Build version 7D1014
我还尝试使用" npm install -g cordova@6.1.1"安装Cordova CLI的特定软件包;并取消并重新安装Cordova,但我仍然得到:
Cordova CLI: Not installed