dpa99c / cordova-custom-config

Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml
318 stars 84 forks source link

Cannot install plugin "Failed to fetch plugin" #133

Closed tobiasmuecksch closed 6 years ago

tobiasmuecksch commented 6 years ago

I've started a brand new Cordova project and tried to add this plugin, but ran into the following error

The command I've entered:

> cordova plugin add cordova-custom-config --save

The error:

Error: Failed to fetch plugin git+https://github.com/dpa99c/cordova-custom-config.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

[ERROR] An error occurred while running cordova plugin add cordova-custom-config --save (exit code 1).

Installing other plugins works without any problems. Is it just me or is this a known error?

dpa99c commented 6 years ago

Something is screwy there because you've referenced the plugin by its ID on npm, cordova-custom-config, yet the URL it corresponds to is the github URL.

I would do the following:

If that fails, try adding direct from the Github repo:

cordova plugin add https://github.com/dpa99c/cordova-custom-config.git

Also make sure you're using cordova@7 CLI.

tobiasmuecksch commented 6 years ago

Thank you for the fast reply, you've pointed me in the right direction.

In my case, one of my plugins had a broken dependency reference to this plugin which somehow interfered...