ionic-frameworkcordova-cliionic-cli

Ionic error of Cordova lower version - Please install your Cordova CLI to version >=4.2.0


Installed Ionic successfully. When running ionic info and other commands like ionic browser --list, I get an error that cordova is lower then version 4.

Cordova is installed with no sudo and in global home directory.

> ionic info

Your system information:

Cordova CLI: 6.1.0 (cordova-lib@undefined)
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
OS: Distributor ID:     Ubuntu Description:     Ubuntu 15.10 
Node Version: v5.9.1


******************************************************
 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 installation is at:

> which cordova
  /home/user_1/.npm-global/bin/cordova

Ionic installation is at:

> which ionic
/home/user_1/.npm-global/bin/ionic

Solution

  • I've tried a lot of different methods to resolve this, like reinstall with and without the --unsafe-perm=true --allow-root flags (which is how others advised to fix it on other questions/other places online) but it seems to be an issue with cordova at version 6.1.0 and ionic so for now use 6.0.0 by running

    npm install -g cordova@6.0.0
    

    That should do the trick as it is seems 6.1.0 isn't a stable version.