You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Omar Mefire (JIRA)" <ji...@apache.org> on 2016/02/22 21:32:18 UTC

[jira] [Updated] (CB-9125) Cordova prepare fails when two plugins have the same dependency

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

Omar Mefire updated CB-9125:
----------------------------
    Assignee:     (was: Omar Mefire)

> Cordova prepare fails when two plugins have the same dependency
> ---------------------------------------------------------------
>
>                 Key: CB-9125
>                 URL: https://issues.apache.org/jira/browse/CB-9125
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>            Reporter: Sébastien Tour
>            Priority: Minor
>
> CLI version: 5.0.0
> OS: Max OS X Yosemite
> In my `config.xml`I have the following:
> {quote}
> ...
> <engine name="android" spec="^4.0.0" />
> ...
> <plugin name="cordova-plugin-file-transfer" spec="^1.1.0" />
> <plugin name="cordova-plugin-media" spec="^1.0.0" />
> ...
> {quote}
> With git, i ignore *platforms/* and *plugins/* so that when I clone the repo, I just use *cordova prepare* and it installs the android platform and plugins.
> But when *cordova prepare* installs plugins, I get this error:
> {quote}
> Installing "cordova-plugin-file-transfer" for android
> Installing "cordova-plugin-media" for android
> Fetching plugin "cordova-plugin-file" via npm
> Fetching plugin "cordova-plugin-file" via npm
> Installing "cordova-plugin-file" for android
> Installing "cordova-plugin-file" for android
> Error during processing of action! Attempting to revert...
> Failed to install 'cordova-plugin-file':Error: Uh oh!
> "/Users/ubidev/Projects/R2A-Client/Mobile/platforms/android/src/org/apache/cordova/file/EncodingException.java" already exists!
>     at Object.module.exports.common.copyNewFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:67:19)
>     at Object.module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:78:20)
>     at installWrapper (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/platforms.js:76:32)
>     at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:68:25)
>     at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:543:20)
>     at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:335:28
>     at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
>     at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
>     at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
>     at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
> Failed to install 'cordova-plugin-file-transfer':Error: Uh oh!
> "/Users/ubidev/Projects/R2A-Client/Mobile/platforms/android/src/org/apache/cordova/file/EncodingException.java" already exists!
>     at Object.module.exports.common.copyNewFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:67:19)
>     at Object.module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:78:20)
>     at installWrapper (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/platforms.js:76:32)
>     at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:68:25)
>     at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:543:20)
>     at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:335:28
>     at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
>     at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
>     at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
>     at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
> Installing "cordova-plugin-file-transfer" for android
> {quote}
> cordova-plugin-file-transfer and cordova-plugin-media both have a dependency to cordova-plugin-file. It seems that, as they are installed concurrently, they're both trying to install the cordova-plugin-file and it creates a conflict.
> When I add the plugins with two seperate *cordova plugin add* commands, it works fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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