Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13942

Plugin Install Fails with Dependency Failure

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-lib
    • Labels:
      None

      Description

      I'm creating a new plugin that has a dependency on `cordova-plugin-file` and when I uninstall then re-install the plugin with plugman an error occurs. Looking at the code its pretty obvious why its failing. The `else` doesn't handle all cases, so `P` isn't set.
      https://github.com/apache/cordova-lib/blob/master/src/plugman/fetch.js#L144

      plugman install --platform android --project platforms/android --plugin "/Users/gb/repos/cordova-plugin-cookie-persistence" --link -d
      Requesting plugin "cordova-plugin-file@^6.0.1".
      Plugin dependency "cordova-plugin-file" not fetched, retrieving then installing.
      Failed to install 'cordova-plugin-cookie-persistence': TypeError: Cannot read property 'fail' of undefined
       at /usr/local/lib/node_modules/plugman/node_modules/cordova-lib/src/plugman/fetch.js:168:18
       at _fulfilled (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:787:54)
       at self.promiseDispatch.done (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:816:30)
       at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:749:13)
       at /usr/local/lib/node_modules/plugman/node_modules/q/q.js:509:49
       at flush (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:108:17)
       at _combinedTickCallback (internal/process/next_tick.js:131:7)
       at process._tickCallback (internal/process/next_tick.js:180:9)
      Cannot read property 'fail' of undefined TypeError: Cannot read property 'fail' of undefined
       at /usr/local/lib/node_modules/plugman/node_modules/cordova-lib/src/plugman/fetch.js:168:18
       at _fulfilled (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:787:54)
       at self.promiseDispatch.done (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:816:30)
       at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:749:13)
       at /usr/local/lib/node_modules/plugman/node_modules/q/q.js:509:49
       at flush (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:108:17)
       at _combinedTickCallback (internal/process/next_tick.js:131:7)
       at process._tickCallback (internal/process/next_tick.js:180:9)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gregberns Greg Berns
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: