cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Jesse (JIRA)" <>
Subject [jira] [Created] (CB-12474) Dependencies in the root project directory can conflict with those in plugins
Date Mon, 20 Feb 2017 08:07:44 GMT
Brian Jesse created CB-12474:

             Summary: Dependencies in the root project directory can conflict with those in
                 Key: CB-12474
             Project: Apache Cordova
          Issue Type: Bug
          Components: CLI
    Affects Versions: 6.5.0
         Environment: OSX: 10.12.3
node: v7.4.0
npm: 4.2.0
Cordova-ios: 4.3.1
Cordova-android: 6.1.2
            Reporter: Brian Jesse

I've created a project with several npm dependencies and several Cordova plugins. One of my
dependencies, Braintree, and one of my Cordova plugins,, both depend on the same
package, xml2js. Braintree's version is significantly out of date while's version
is much more recent. There were breaking changes introduced between these package versions.

When running the "cordova build ios android" command a hook script is called inside of the plugin. This plugin hook script ends up loading the version of npm2js that is required
by Braintree.

I am not completely familiar with how dependency management is handled inside of a plugin
currently, but if I were to guess, it seems like plugin dependency installation does not respect
the dependency structure at the project level, but the execution environment seems to be at
the project level never-the-less.

My project structure is as follows:
   - config.xml
   - www/
   - platforms/
   - plugins/
   - package.json
   - node_modules

Here is a link to a minimal environment to reproduce this issue:
simply run "npm test" in a new directory with both of the included files and an error will

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message