Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Cordova CLI and Ionic

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

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`

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

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

...again I still get:

Cordova CLI: Not installed

Does somebody know the correct procedure to install Cordova CLI?

like image 655
Bingla Avatar asked Nov 19 '15 19:11

Bingla


People also ask

Can I use ionic with Cordova?

While developers can still use Cordova in the Ionic stack, the future is Ionic with Capacitor (or Capacitor on its own with any popular web stack!). These apps are known as Web Native apps, in contrast to the older hybrid approach.


1 Answers

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.

like image 144
Bingla Avatar answered Nov 15 '22 00:11

Bingla