Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic - Cordova CLI not installed

Ionic related - I can’t seem to run any of my applications in IOS or Android Simulator as the Cordova CLI will not install.

From reading , it seems it has to do with my upgrade of Node.JS and/or NPM, I believe. But information on it, is not definitive. I’ve been on it for days, and got nowhere. I've attempted all suggestions. Uninstallation's, deletion of hidden files, installations of different stable versions, clearing of cache. Nothing has worked.

My details when I type ionic info are

Cordova CLI: Not installed

Ionic CLI Version: 1.7.12  

Ionic App Lib Version: 0.6.5

ios-deploy version: Not installed

ios-sim version:Not installed  

OS: Mac OS X El Capitan  

Node Version: v4.2.3  

Xcode version: Xcode 7.2 Build version 7C68

When I install cordova sudo npm install -g cordova. It does not fix the above issue. It still stays uninstalled.

I have used this link below to attempt a clean slate without any node.js on my system.

How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

Still cannot fix the problem.

Please help.

like image 838
Cameron_Lynch Avatar asked Dec 18 '15 01:12

Cameron_Lynch


2 Answers

To install Cordova, run command

npm install -g cordova

If you have already Cordova installed, or in your case according your own answer you installed version 4 doing npm install -g cordova@4 (last version is 5.x), you can update Cordova to get the last version :

sudo npm update -g cordova
like image 176
Niko Avatar answered Sep 25 '22 09:09

Niko


I solved the issue by typing the following into the terminal:

npm install -g cordova@4
like image 44
Cameron_Lynch Avatar answered Sep 22 '22 09:09

Cameron_Lynch