安装Cordova CLI和Ionic [英] Installing Cordova CLI and Ionic

查看:691
本文介绍了安装Cordova CLI和Ionic的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我将ionic.js与ionic和cordova一起安装了:

Recently I installed node.js together with ionic and cordova with:

sudo npm install -g cordova ionic

......一切似乎都运转正常。但是当我跑步时:

... and everything seems to work fine. But when I run:

ionic info

似乎缺少Cordova CLI:

It seems that Cordova CLI is missing:

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`

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

然后我尝试将cordova升级为建议。我还试图卸载cordova并重新安装它,在重新安装之前清除npm缓存但运行之后

I then tried to upgrade cordova as suggested. I also tried to uninstall cordova and reinstall it, clearing the npm cache before reinstallment but after running

ionic info

...我仍然得到:

Cordova CLI: Not installed

是否有人知道安装Cordova CLI的正确步骤?

Does somebody know the correct procedure to install Cordova CLI?

推荐答案

最后答案很简单:将cordova更新为特定包。我最终使用:

In the end the answer was simple: update cordova to a specific package. I ended up using:

npm install -g cordova@4

...解决了这个问题。

... which solved the problem.

这篇关于安装Cordova CLI和Ionic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆