_From @anishone on February 3, 2016 7:41_
I installed cordova using sudo npm install -g cordova and can see that its installed:
sudo npm -g list | grep cordova
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
But, ionic info shows that Cordova CLI is not installed.
$ sudo ionic info
Your system information:
Cordova CLI: Not installed
Ionic Version: 2.0.0-alpha.53
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
ios-deploy version: Not installed
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.3.0
Xcode version: Xcode 6.4 Build version 6E35b
However, if I install [email protected], then ionic info identifies that its installed. Strange!
I tried uninstalling and reinstalling ionic, ionic@beta.. but still it shows the same error. Am I missing something? Is there any way to let ionic know the path of Cordova? I want to use newer versions of cordova.
Thanks!
_Copied from original issue: driftyco/ionic#5313_
_From @anishone on February 4, 2016 6:5_
Thanks @tlancina . Let me know if you need any other debug info from me. I m still stuck with this :(
I'm suffering with the same identical issue, did you guys ever find a solution?
I figured out the issue (at least for me). I didn't have permissions to the Cordova folder after updating to 6.0. Try this stack overflow helped.
@jdpipkin Thanks for getting back to me. Yes, I did something similar and outlined it here: https://forum.ionicframework.com/t/cordova-cli-6-0-0-not-detected-please-help/47012/3?u=pjhartin
But yes it seemed to be a permissions issue, and a sudo issue for me. Glad it seems to be working now!
Looks like ionic get the cordova version from the update-notifier-cordova.json which is in ~/.config/configstore (for Linux). Just do
sudo chown $your_user update-notifier-cordova.json
and this will solve the problem
@biruwon Dude, big thanks ! I search for a long time why the heck I can't install cordova > 4.2, your trick saved me and works flawlessly !
Hi all. I'm having the same issue here.
Just adding some detail.
By doing "ionic info" I got "Cordova CLI: Not installed"
and by doing: "sudo ionic info", I got "Cordova CLI: 6.1.1"
So, it must be a permission issue indeed.
Hello all! I seem to not be able to repro this on my machine with osx el capitan and cordova 6.0.0. Is this only an issue with cordova 6.1.1?
Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!
How about on Windows? Got the same problem but not seem to be a permission issue.
For mac just use sudo ionic info
Still getting this issue on Linux Mint x64.
cordova -v: 6.4.0
ionic -v: 2.1.17
node -v: 6.9.2
npm -v: 3.10.9
Running ionic info prints:
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: Not installed
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.9.2
Xcode version: Not installed
Strangely, running sudo ionic info prints:
sudo: ionic: command not found
The above "fix" with sudo chown didn't work for me.
I also tried to give the ownership to my update-notifier-cordova.json file but it didn't worked. What make it worked for me is give the ownership to the entire folder with the command:
sudo chown -R $your_user .config/configstore/
Hope it helps!
@ciesielskico Did u find a workaround ?
Fix was to fix npm permissions as described here https://johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/
I check tonight, I was sure that was something like that because I moved my npm global package to my home directly. Thanks buddy
Most helpful comment
Looks like ionic get the cordova version from the update-notifier-cordova.json which is in ~/.config/configstore (for Linux). Just do
sudo chown $your_user update-notifier-cordova.jsonand this will solve the problem