Plugin cordova without a package.json ... How add it?

I want tou use a cordova plugin from a repo, but when i’m doing a cordova add plugin “namerepo” i’m facing an npm install error and if i want to add it manual way i get an error (needs a valid package.json).


Please post the exact errors you are getting.

In general:

  1. Get the plugin fixed
  2. Fork the plugin and add a package.json
  3. Install with --nofetch might also help

It’s a cordova plugin.

If i do: cordova plugin add

Error: Failed to fetch plugin via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install

If i add the plugin with this structure:

   + MyService\
      + src\
      |   + android\
      + www\

And then do the :

cordova plugin add c:\MyService

get the package.json failure