cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Mednik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-12918) Inconsistent behavior between "cordova prepare" and "cordova plugin add" when installing plugin from local folder
Date Wed, 14 Jun 2017 20:26:00 GMT

     [ https://issues.apache.org/jira/browse/CB-12918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Max Mednik updated CB-12918:
----------------------------
    Description: 
Running "cordova prepare" and "cordova plugin add" handle plugin installation from a local
folder differently and either one or another breaks depending on which one used first. 
For example, I have a plugin defined as following:
{code}
{
    ...
    "dependencies": {
        ...
        "cordova-plugin-x": "file:custom_plugins/cordova-plugin-x"
    },
    ....
    "cordova": {
        "platforms": [
            "android",
            "ios"
        ],
        "plugins": {
            ...
            "cordova-plugin-x": {}
        }
    }
}
{code}

This config is created when I run "cordova plugin add ./custom_plugins/cordova-plugin-x" and
everything works as expected. But, if you try to run "cordova prepare" afterwards it will
fail with the following message:
{code}
Failed to restore plugin "cordova-plugin-x" from config.xml. You might need to try adding
it again. Error: Failed to fetch plugin cordova-plugin-x@file:custom_plugins/cordova-plugin-x
via registry.
{code}

  was:
Running "cordova prepare" and "cordova plugin add" handle plugin installation from a local
folder differently and either one or another breaks depending on which one used first. 
For example, I have a plugin defined as following:
{code}
{
    ...
    "dependencies": {
        ...
        "cordova-plugin-x": "file:custom_plugins/cordova-plugin-x"
    },
    ....
    "cordova": {
        "platforms": [
            "android",
            "ios"
        ],
        "plugins": {
            ...
            "cordova-plugin-x": {}
        }
    }
}
{code}

This config is created when I run "cordova plugin add ./custom_plugins/cordova-plugin-x" and
everything works as expected. But, if you try to run "cordova prepare" afterwards it will
fail with the following message:
{code}
Failed to restore plugin "cordova-plugin-x" from config.xml. You might need to try adding
it again. Error: Failed to fetch plugin cordova-plugin-x@file:custom_plugins/cordova-plugin-x
via registry.
{code}
Also, I've noticed that fetch.json in plugins folder uses source type "registry" for a locally
installed plugin.


> Inconsistent behavior between "cordova prepare" and "cordova plugin add" when installing
plugin from local folder
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-12918
>                 URL: https://issues.apache.org/jira/browse/CB-12918
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: 6.5.0, 7.0.1
>            Reporter: Max Mednik
>
> Running "cordova prepare" and "cordova plugin add" handle plugin installation from a
local folder differently and either one or another breaks depending on which one used first.

> For example, I have a plugin defined as following:
> {code}
> {
>     ...
>     "dependencies": {
>         ...
>         "cordova-plugin-x": "file:custom_plugins/cordova-plugin-x"
>     },
>     ....
>     "cordova": {
>         "platforms": [
>             "android",
>             "ios"
>         ],
>         "plugins": {
>             ...
>             "cordova-plugin-x": {}
>         }
>     }
> }
> {code}
> This config is created when I run "cordova plugin add ./custom_plugins/cordova-plugin-x"
and everything works as expected. But, if you try to run "cordova prepare" afterwards it will
fail with the following message:
> {code}
> Failed to restore plugin "cordova-plugin-x" from config.xml. You might need to try adding
it again. Error: Failed to fetch plugin cordova-plugin-x@file:custom_plugins/cordova-plugin-x
via registry.
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message