Cameron_Lynch
Cameron_Lynch

Reputation: 173

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.

Upvotes: 12

Views: 23184

Answers (6)

Amit Gupta
Amit Gupta

Reputation: 2806

Today same issue came at my new Mac having Catalina and I resolved it by running below command at terminal :-

sudo npm i -g cordova

Above command installed Cordova globally in my Mac.

Hope it will help someone in future.

Upvotes: 0

Devner
Devner

Reputation: 7235

You can also try:

npm install -g cordova ionic

Upvotes: 0

Sebastian Moncada
Sebastian Moncada

Reputation: 85

try with:

sudo npm install -g cordova@4

I had the same problem and it worked!

Upvotes: 0

Cameron_Lynch
Cameron_Lynch

Reputation: 173

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

npm install -g cordova@4

Upvotes: 5

Niko
Niko

Reputation: 3422

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

Upvotes: 10

Tuan Anh Tran
Tuan Anh Tran

Reputation: 7237

Where did you install the global cordova CLI to? To check, you can issue this command in terminal which cordova. it should return a path where cordova cli is located. If not, you will have to add NPM global path to your shell.

Upvotes: 1

Related Questions