You can see from my Ionic Docker image's build output that cordova is installed the recommended way; but the warning is emitted anyway (when running ionic serve in this example, on a v2 example app):
$ ./serve
Sending build context to Docker daemon 18.88 MB
Step 1 : FROM node:4
---> 5d0dbcaffefc
Step 2 : RUN npm install -g ionic cordova
---> Using cache
---> 4afb85d06aa6
Step 3 : WORKDIR /opt/some-ionic-project
---> Using cache
---> d01bdd20eba7
Successfully built d01bdd20eba7
******************************************************
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`
******************************************************
Running 'serve:before' gulp task before serve
[13:17:02] Starting 'clean'...
...
By default, npm install -g cordova uses a Cordova that is quite a bit newer than the recommended minimum - is it too new?
$ cordova --version
6.3.1
Could you provide me with the output from ionic info from within your project directory? Thanks, this should help in troubleshooting.
I also see this warning. Here is the output of ionic info:
$ 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.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.48
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.3.0
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`
******************************************************
@jthoms1 sorry for the late reply.
Like this right in one of my projects right now:
(were obviously on slightly older versions of most components back in September: and did use Node.js v4 at that point.)
# 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:
Cordova CLI: You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.2
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 works just fine in this setup btw
I had the same problem. Here is how I solved it.
After installing cordova with command npm install -g cordova ionic I got the version warning:
C:\Users\john\IdeaProjects\test\todo>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.4.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.3
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'
******************************************************
But after running npm install -g cordova again, as a seperate installation, the warning disappeared. I have no idea why though.
C:\Users\john\IdeaProjects\test\todo>npm install -g cordova
npm WARN deprecated [email protected]: use uuid module instead
C:\Users\john\AppData\Roaming\npm\cordova -> C:\Users\john\AppData\Roaming\npm\node_modules\cordova\bin\cordova
C:\Users\john\AppData\Roaming\npm
'-- [email protected]
+-- [email protected]
| '-- [email protected]
| '-- [email protected]
| '-- [email protected]
| '-- [email protected]
'-- [email protected]
'-- [email protected]
'-- [email protected]
C:\Users\john\IdeaProjects\test\todo>ionic info
Your system information:
ordova CLI: 6.4.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.3
Xcode version: Not installed
Hope that helps.
Hi,
I solved this issue running(I am new on ionic, I don't know below command effect):
cordova telemetry on
19:50 > ionic info
Your system information:
Cordova 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: Linux 4.4
Node Version: v6.9.4
Xcode version: Not installed
18:38 > 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:
Cordova CLI: 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: Linux 4.4
Node Version: v6.9.4
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
hi guys, I had same problem.
I try uninstall ionic and cordova and then change the permission using chown.
The problem cant be solve.
This is what I got :
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: OS X El Capitan
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62
Same issue, and turning cordova telemetry on fixed it.
Theory: ionic checks version number by running cordova -v, and the first line's result is "Cordova CLI: You have been opted out of telemetry. ..." rather than the version number. Turning telemetry on makes it so the version number is the first line.
I have麓d the same problem, I can solved using the following line, type in your shell
cordova telemetry on, the service CLI could be repared.
cordova telemetry on 鍙互瑙e喅杩欎釜闂
Experienced the same problem over here in windows 10 land with a fresh global (and local) install of cordova and ionic via normal npm installs. Following the tutorial shouldn't result in any error or warning messages.
Just need to switch the telemetry warning to be after the version probably. (EDIT: or, since that would be a cordova issue, make ionic's cordova version parsing a little better)
I've solve this issue. when ionic app installation completed. It give me this error.
Please install your Cordova CLI to version >=4.2.0 npm install -g cordova
ionic info
Ionic CLI Version: 6.2.3
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.3
Xcode version: Not installed
After that i've uninstall cordova
npm uninstall -g cordova
Reinstall older version
npm install -g [email protected]
@Surinder22Batti That's a work around, not a solution. I think cordova telemetry on is better than downgrading.
The library that originates the error, ionic-app-lib, can add custom code to check the version of cordova. This seems like an ugly way, but I'm not sure how to get around cordova spitting out the telemetry warning, but I also don't like needing to turn telemetry on to get rid of a warning...
Here's a PR for that: driftyco/ionic-app-lib#141 .
Fix: If you run cordova -v, it asks you if you want to opt in or out of telemetry. Afterwards cordova -v just returns the version string and the dependency warning is gone.
This should be reported as an issue in Cordova though, because it's bad behavior of the version command.
I added an issue in Cordova's jira issue tracker here.
i have the same issue
$ 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 Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v6.10.1
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
Even though, upgrade the cordova. still It shows the issue.This is my cordova version
$ cordova -v
You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.5.0
I'm a bit surprised, but I fixed this by running 'cordova info' after installing. Once it had asked if it could report usage info, the warning went away. Just a shot in the dark, but maybe ionic calls 'cordova info', and it doesn't run because it wants an answer on the anonymous usage info, so ionic can't figure out what version of cordova you're running?
@wallacer Ionic definitely runs cordova -v.
If cordova info prompts you for the telemetry and gets an answer, it will track that state and that's the state cordova's version command inspects.
That's the problem.
No state should be inspected for cordova's version command. It should spit out the version number and do nothing else. Hence my jira ticket.
I'm also going to make a PR once I figure out where the version info gets spit out. Here's their github repo if anyone wants to beat me to it.
I don't see this happening anymore with the latest cordova.
I'm thinking we're not seeing the warnings anymore. Probably can close this issue.
@tomsun Do you still experience this on a fresh install? I just did an npm uninstall and install of cordova and it didn't give it to me.
@snewell92 Sorry, I actually am not up to date at all on this issue or anything, I was just searching for a way to resolve my issue, happened across this thread, then happened to fix it myself, and sounds like I was correct in my assumption of what had gone wrong. Didn't dig into source or anything
Just wanted to comment in case it helped anyone else in my boat. Thanks for the update!
Thanks for the issue! This issue appears to be associated with an old version of the Ionic CLI. Please update to the latest CLI version, which supports all versions of the Ionic Framework. If the issue is relevant and if it persists after updating to the latest CLI version, please create a new issue.
Thank you for using Ionic!
Most helpful comment
Hi,
I solved this issue running(I am new on ionic, I don't know below command effect):
cordova telemetry onAfter this command:
19:50 > ionic infoYour system information:
Cordova 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: Linux 4.4
Node Version: v6.9.4
Xcode version: Not installed
Before the command:
18:38 > ionic infoDependency 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 cordovaYour system information:
Cordova CLI: 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: Linux 4.4
Node Version: v6.9.4
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