0

I need to integrate the CometChat into my Cordova application. So by following https://support.cometchat.com/documentation/php/cordova-chat-plugin-ionic-chat-plugin/adnroid-cordova-ionic-phonegap-chat-plugin/initial-setup/

and for that i have downloaded the SDKs for Android & iOS from https://my.cometchat.com/licenses

But now when i am trying to install the sdk plugins using cmd:

cordova platform add 'PATH_TO_MY_LOCAL_FOLDER_HAVING_SDK_PLUGIN_PATH'

I am facing error like this:

Error_Screenshot

How do i resolve the the issue?

James Z
  • 12,209
  • 10
  • 24
  • 44
Kunal Kakkad
  • 653
  • 6
  • 19

1 Answers1

3

You can either add a package.json file to the donwloaded plugin or you can install it with the --nofetch flag:

cordova/phonegap plugin add <path/to/local/plugin> --nofetch

Since cordova 7.0.0 npm install is run by default when adding a new plugin which causes an error if no package.json is present. You can find the release notes for cordova 7.0.0 here.

David
  • 7,387
  • 3
  • 22
  • 39