11

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.

ShadowUC
  • 510
  • 3
  • 15
Cameron_Lynch
  • 163
  • 1
  • 1
  • 7

6 Answers6

10

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
Niko
  • 3,277
  • 22
  • 34
5

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

npm install -g cordova@4
Pang
  • 8,605
  • 144
  • 77
  • 113
Cameron_Lynch
  • 163
  • 1
  • 1
  • 7
1

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.

Tuan Anh Tran
  • 5,328
  • 5
  • 28
  • 44
0

try with:

sudo npm install -g cordova@4

I had the same problem and it worked!

0

You can also try:

npm install -g cordova ionic

Devner
  • 5,855
  • 9
  • 53
  • 82
0

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.

Amit Gupta
  • 2,453
  • 1
  • 13
  • 24