Dependency missing for @ionic/cli-plugin-cordova


#1

I am trying to run my ionic project which works well on browser on android device.
I ran the following command
ionic Cordova platform add android
ionic Cordoba build android
But i am getting the error dependency missing for@ionic/cli-plugin-cordova.
What could be the reason and solution


#2

Ionic Cordova build android…


#3

I would either install @ionic/cli-plugin-cordova or downgrade your global Ionic CLI to 2.2.3.


#4

Please let me know how to install ionic click plugin Cordova…
What is the command…


#5

Sorry it’s ionic Cli plugin Cordova.


#6

I installed the ionic cli plugin cordova:-


C:\Users\jmd>ionic info

  Your system information:

    Cordova CLI: 7.0.1
    Ionic CLI Version: 3.0.0-alpha.106
    ios-deploy version: Not installed
    ios-sim version: Not installed
    OS: Windows 7
    Node Version: v6.10.3
    Xcode version: Not installed

C:\Users\jmd>npm i @ionic/cli-plugin-cordova
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\jmd\package
.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\jmd\package.js
on'
npm WARN jmd No description
npm WARN jmd No repository field.
npm WARN jmd No README data
npm WARN jmd No license field.
npm WARN jmd Invalid dependency: @ionic/cli-utils undefined
npm WARN jmd Invalid dependency: ansi-escapes undefined
npm WARN jmd Invalid dependency: ansi-regex undefined
npm WARN jmd Invalid dependency: ansi-styles undefined
npm WARN jmd Invalid dependency: archiver undefined
npm WARN jmd Invalid dependency: archiver-utils undefined
npm WARN jmd Invalid dependency: async undefined
npm WARN jmd Invalid dependency: asynckit undefined
npm WARN jmd Invalid dependency: balanced-match undefined
npm WARN jmd Invalid dependency: bl undefined
npm WARN jmd Invalid dependency: brace-expansion undefined
npm WARN jmd Invalid dependency: buffer-crc32 undefined
npm WARN jmd Invalid dependency: chalk undefined
npm WARN jmd Invalid dependency: cli-cursor undefined
npm WARN jmd Invalid dependency: cli-width undefined
npm WARN jmd Invalid dependency: combined-stream undefined
npm WARN jmd Invalid dependency: component-emitter undefined
npm WARN jmd Invalid dependency: compress-commons undefined
npm WARN jmd Invalid dependency: concat-map undefined
npm WARN jmd Invalid dependency: cookiejar undefined
npm WARN jmd Invalid dependency: core-util-is undefined
npm WARN jmd Invalid dependency: crc undefined
npm WARN jmd Invalid dependency: crc32-stream undefined
npm WARN jmd Invalid dependency: cross-spawn undefined
npm WARN jmd Invalid dependency: debug undefined
npm WARN jmd Invalid dependency: delayed-stream undefined
npm WARN jmd Invalid dependency: duplexer undefined
npm WARN jmd Invalid dependency: end-of-stream undefined
npm WARN jmd Invalid dependency: escape-string-regexp undefined
npm WARN jmd Invalid dependency: event-stream undefined
npm WARN jmd Invalid dependency: extend undefined
npm WARN jmd Invalid dependency: external-editor undefined
npm WARN jmd Invalid dependency: figures undefined
npm WARN jmd Invalid dependency: firebase undefined
npm WARN jmd Invalid dependency: form-data undefined
npm WARN jmd Invalid dependency: formidable undefined
npm WARN jmd Invalid dependency: from undefined
npm WARN jmd Invalid dependency: fs.realpath undefined
npm WARN jmd Invalid dependency: glob undefined
npm WARN jmd Invalid dependency: graceful-fs undefined
npm WARN jmd Invalid dependency: has-ansi undefined
npm WARN jmd Invalid dependency: iconv-lite undefined
npm WARN jmd Invalid dependency: inflight undefined
npm WARN jmd Invalid dependency: inherits undefined
npm WARN jmd Invalid dependency: inquirer undefined
npm WARN jmd Invalid dependency: is-fullwidth-code-point undefined
npm WARN jmd Invalid dependency: is-promise undefined
npm WARN jmd Invalid dependency: isarray undefined
npm WARN jmd Invalid dependency: isexe undefined
npm WARN jmd Invalid dependency: jschardet undefined
npm WARN jmd Invalid dependency: lazystream undefined
npm WARN jmd Invalid dependency: leek undefined
npm WARN jmd Invalid dependency: lodash undefined
npm WARN jmd Invalid dependency: lodash._baseassign undefined
npm WARN jmd Invalid dependency: lodash._basecopy undefined
npm WARN jmd Invalid dependency: lodash._bindcallback undefined
npm WARN jmd Invalid dependency: lodash._createassigner undefined
npm WARN jmd Invalid dependency: lodash._getnative undefined
npm WARN jmd Invalid dependency: lodash._isiterateecall undefined
npm WARN jmd Invalid dependency: lodash.assign undefined
npm WARN jmd Invalid dependency: lodash.isarguments undefined
npm WARN jmd Invalid dependency: lodash.isarray undefined
npm WARN jmd Invalid dependency: lodash.keys undefined
npm WARN jmd Invalid dependency: lodash.restparam undefined
npm WARN jmd Invalid dependency: lru-cache undefined
npm WARN jmd Invalid dependency: macos-release undefined
npm WARN jmd Invalid dependency: map-stream undefined
npm WARN jmd Invalid dependency: methods undefined
npm WARN jmd Invalid dependency: mime undefined
npm WARN jmd Invalid dependency: mime-db undefined
npm WARN jmd Invalid dependency: mime-types undefined
npm WARN jmd Invalid dependency: mimic-fn undefined
npm WARN jmd Invalid dependency: mingo undefined
npm WARN jmd Invalid dependency: minimatch undefined
npm WARN jmd Invalid dependency: minimist undefined
npm WARN jmd Invalid dependency: ms undefined
npm WARN jmd Invalid dependency: mute-stream undefined
npm WARN jmd Invalid dependency: ncp undefined
npm WARN jmd Invalid dependency: normalize-path undefined
npm WARN jmd Invalid dependency: once undefined
npm WARN jmd Invalid dependency: onetime undefined
npm WARN jmd Invalid dependency: os-name undefined
npm WARN jmd Invalid dependency: os-tmpdir undefined
npm WARN jmd Invalid dependency: path-is-absolute undefined
npm WARN jmd Invalid dependency: pause-stream undefined
npm WARN jmd Invalid dependency: process-nextick-args undefined
npm WARN jmd Invalid dependency: progress undefined
npm WARN jmd Invalid dependency: pseudomap undefined
npm WARN jmd Invalid dependency: qs undefined
npm WARN jmd Invalid dependency: readable-stream undefined
npm WARN jmd Invalid dependency: remove-trailing-separator undefined
npm WARN jmd Invalid dependency: restore-cursor undefined
npm WARN jmd Invalid dependency: rimraf undefined
npm WARN jmd Invalid dependency: rsvp undefined
npm WARN jmd Invalid dependency: run-async undefined
npm WARN jmd Invalid dependency: rx undefined
npm WARN jmd Invalid dependency: safe-buffer undefined
npm WARN jmd Invalid dependency: save undefined
npm WARN jmd Invalid dependency: sax undefined
npm WARN jmd Invalid dependency: semver undefined
npm WARN jmd Invalid dependency: signal-exit undefined
npm WARN jmd Invalid dependency: slice-ansi undefined
npm WARN jmd Invalid dependency: split undefined
npm WARN jmd Invalid dependency: stream-combiner undefined
npm WARN jmd Invalid dependency: string-width undefined
npm WARN jmd Invalid dependency: string_decoder undefined
npm WARN jmd Invalid dependency: strip-ansi undefined
npm WARN jmd Invalid dependency: superagent undefined
npm WARN jmd Invalid dependency: supports-color undefined
npm WARN jmd Invalid dependency: tar-stream undefined
npm WARN jmd Invalid dependency: through undefined
npm WARN jmd Invalid dependency: tmp undefined
npm WARN jmd Invalid dependency: underscore undefined
npm WARN jmd Invalid dependency: util-deprecate undefined
npm WARN jmd Invalid dependency: uuid undefined
npm WARN jmd Invalid dependency: walkdir undefined
npm WARN jmd Invalid dependency: which undefined
npm WARN jmd Invalid dependency: win-release undefined
npm WARN jmd Invalid dependency: wrappy undefined
npm WARN jmd Invalid dependency: xml2js undefined
npm WARN jmd Invalid dependency: xmlbuilder undefined
npm WARN jmd Invalid dependency: xtend undefined
npm WARN jmd Invalid dependency: yallist undefined
npm WARN jmd Invalid dependency: zip-stream undefined

+ @ionic/cli-plugin-cordova@1.3.0
added 1 package and updated 19 packages in 81.417s




C:\Users\jmd\summer-ionic>ionic cordova platform add android
TypeError: plugin.run is not a function
    at Object.<anonymous> (C:\Users\jmd\AppData\Roaming\npm\node_modules\ionic\d
ist\ionic.js:11097:26)
    at next (native)
    at fulfilled (C:\Users\jmd\AppData\Roaming\npm\node_modules\ionic\dist\ionic
.js:11056:58)

C:\Users\jmd\summer-ionic>

How should I proceed??


#7

add --save-dev to your install command and install it again


#8

should I run the command-

npm i @ionic/cli-plugin-cordova --save-dev

like this?


#9

Yes! That should fix the problem, I guess ^^


#10

i m still getting the same error

C:\Users\jmd\summer-ionic>ionic cordova platform add android
TypeError: plugin.run is not a function
    at Object.<anonymous> (C:\Users\jmd\AppData\Roaming\npm\node_modules\ionic\d
ist\ionic.js:11097:26)
    at next (native)
    at fulfilled (C:\Users\jmd\AppData\Roaming\npm\node_modules\ionic\dist\ionic
.js:11056:58)

#11

Check out the ionic-preview-app dependencies: https://github.com/ionic-team/ionic-preview-app/blob/master/package.json

They should match your package.json. Remove all misplaced dependencies, remove the node_modules folder and run npm install again.


#12

Ok.I am trying this and would let you know if it works correctly for me.


#13

I am still getting the same error.
Plugin.run is not a function.
On running the command ionic Cordova platform add android

If i simply run ionic platform add android.
I am getting error platform command is no longer available


#14

If i am only running ionic serve.
I am getting errors dependency missing for @ionic/cli-plugin-core
Cannot find module
C:…node_modules@ionic\cli-plugin-core


#15

The error has been resolved.
By running command Cordova platform add android.

Instead of ionic Cordova platform add android


#16

You are on a really, really old and broken alpha version of the CLI v3. You shoud uninstall and reinstall this.
npm uninstall -g ionic
npm install -g ionic

Then you will get a current and actually working version of Ionic.


Plugin.run is not a function