2015-11-19 263 views
6

最近我安裝的node.js連同離子和科爾多瓦用:安裝科爾多瓦CLI和離子

sudo npm install -g cordova ionic 

...一切似乎正常工作。但是,當我運行:

ionic info 

看來,科爾多瓦CLI丟失:

Your system information: 

Cordova CLI: Not installed 
Gulp version: CLI version 3.9.0 
Gulp local: Local version 3.9.0 
Ionic Version: 1.1.1 
Ionic CLI Version: 1.7.10 
Ionic App Lib Version: 0.6.5 
ios-deploy version: 1.8.2 
ios-sim version: 5.0.3 
OS: Mac OS X El Capitan 
Node Version: v5.1.0 
Xcode version: Xcode 7.1.1 Build version 7B1005 


****************************************************** 
Dependency warning - for the CLI to run correctly,  
it is highly suggested to install/upgrade the following:  

Please install your Cordova CLI to version >=4.2.0 `npm install -g 
cordova` 

****************************************************** 

我又試圖爲建議升級科爾多瓦。我也試着卸載科爾多瓦和重新安裝,reinstallment之前,但運行

ionic info 

後清零NPM緩存...再次我仍然得到:

Cordova CLI: Not installed 

是否有人知道正確的步驟安裝科爾多瓦CLI?

回答

11

最後答案很簡單:將cordova更新爲特定的包。我結束了使用:

npm install -g [email protected] 

...它解決了問題。

+0

感謝,對我的作品 – deadcode

0

依賴關係的警告 - 爲CLI正常運行, 強烈建議安裝/升級如下:

請安裝您的科爾多瓦CLI爲版本> = 4.2.0 npm install -g cordova


您的系統信息:

 
Cordova CLI: Not installed 
Ionic CLI Version: 2.2.1 
Ionic App Lib Version: 2.2.0 
ios-deploy version: Not installed 
ios-sim version: Not installed 
OS: Windows 10 
Node Version: v7.5.0 
Xcode version: Not installed 
0

同樣的問題似乎又出現在版本4.2.0中。

運行

$ cordova telemetry off 

解決了這個問題對我來說。 (科爾多瓦遙測上似乎太工作)

詳情:

$ ionic info 
****************************************************** 
Dependency warning - for the CLI to run correctly, 
it is highly recommended to install/upgrade the following: 

Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova` 

****************************************************** 

Your system information: 

You have been opted out of telemetry. To change this, run: cordova telemetry on. 
6.5.0 

Ionic CLI Version: 2.2.1 
Ionic App Lib Version: 2.2.0 
ios-deploy version: Not installed 
ios-sim version: Not installed 
OS: Windows 7 
Node Version: v6.9.5 
Xcode version: Not installed 


****************************************************** 
Dependency warning - for the CLI to run correctly, 
it is highly recommended to install/upgrade the following: 

Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova` 

****************************************************** 


$ cordova telemetry off 
You have been opted out of telemetry. To change this, run: cordova telemetry on. 


$ ionic info 

Your system information: 

ordova CLI: 6.5.0 
Ionic CLI Version: 2.2.1 
Ionic App Lib Version: 2.2.0 
ios-deploy version: Not installed 
ios-sim version: Not installed 
OS: Windows 7 
Node Version: v6.9.5 
Xcode version: Not installed