Cordova CLI will not install

Hi all

I can’t seem to run any of my applications in IOS or Android Simulator. Was hoping somebody could please assist. It would be greatly appreciated.

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.

My details when I type ionic info are

Cordova CLI: Not installed
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic CLI Version: 1.7.12
Ionic App Lib Version: 0.6.5
ios-deploy version: Not installed
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.2.0
Xcode version: Xcode 7.2 Build version 7C68
NPM Version: 3.3.12

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

Camerons-MacBook-Air:test cameronlynch$ sudo ionic run ios
throw err;

Error: Cannot find module 'cordova-common’
at Function.Module._resolveFilename (module.js:327:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:355:17)
at require (internal/module.js:13:17)
at Object. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/plugman.js:22:14)
at Module._compile (module.js:399:26)
at Object.Module._extensions…js (module.js:406:10)
at Module.load (module.js:345:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:355:17)

The above comes up for ionic platform add ios as well.


i am also getting same error ! If someone knows whats the problem and how to fix it please let me know.

npm install -g cordova@4

This fixed it for me

Yes this is work for me perfect.


Please nobody use this command any more. Cordova 4 is ancient, current version is 7.x.