Skip to content

Plugin config/config-plugin needs a valid package.json #29

@cloudwise

Description

@cloudwise

Thank you for sharing your code. I'm trying to setting it up but on installing cordova iOS platform for viewer 1.5, I have two issues related to these sections of "package.json" file of the project:

{
 "id": "com.synconset.cordovaHTTP",
 "location": "https://github.com/evothings/cordova-HTTP#v0.2.2"
 },
{
 "id": "com.evothings.evothingsviewer.config-plugin",
"location": "config/config-plugin" 
}

In both cases Cordova says that related "package.json" file is missing.

In details, running the command "cordova platform add iOS" I receive at first this notification :

_Error: Command failed: cordova plugin add https://github.com/evothings/cordova-HTTP#v0.2.2
Error: Failed to fetch plugin https://github.com/evothings/cordova-HTTP#v0.2.2 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: git+https://github.com/evothings/cordova-HTTP.git#v0.2.2.
npm ERR! package.json npm can't find a package.json file in your current director_

This issue seems to be fixed by replacing the reference to 'com.synconset.cordovaHTTP' package with this one. Is it ok?

    {
      "id": "cordova-plugin-http",
      "location": "https://github.com/wymsee/cordova-HTTP.git"
    },

After this change, if I remove the "platform" directory and apply again the command "cordova platform add iOS" I received this second message:

Error: Invalid Plugin! config/config-plugin needs a valid package.json
Error: Command failed: cordova plugin add config/config-plugin
Error: Invalid Plugin! config/config-plugin needs a valid package.json

Could you please help me to fix them?

I'm using cordova 7.1.0, node.js 8.1.0, npm 5.5.1 and XCode 9.0.1 on macOS 10.12.6.

Thanks a lot,
Luigi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions