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

Auto-restoring a plugin fails when adding a platform

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Master
    • None
    • cordova-lib
    • None

    Description

      Start with a blank Cordova app, then enter the following:

      cordova plugin add org.apache.cordova.camera --save
      cordova plugin remove org.apache.cordova.camera
      cordova platform add browser
      

      The final step should restore the camera plugin, but it fails with the following exception:

      TypeError: Cannot read property 'latest' of undefined
          at next (D:\GIT\Cordova\cordova-lib\cordova-lib\node_modules\npm\lib\cache.js:694:35)
          at D:\GIT\Cordova\cordova-lib\cordova-lib\node_modules\npm\lib\cache.js:682:5
          at RegClient.get_ (D:\GIT\Cordova\cordova-lib\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\get.js:105:14)
          at RegClient.<anonymous> (D:\GIT\Cordova\cordova-lib\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\get.js:41:12)
          at fs.js:336:14
          at D:\GIT\Cordova\cordova-lib\cordova-lib\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:103:5
          at FSReqWrap.oncomplete (fs.js:99:15)
      

      Attachments

        Activity

          People

            TimBarham Tim Barham
            TimBarham Tim Barham
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5h
                5h
                Remaining:
                Remaining Estimate - 5h
                5h
                Logged:
                Time Spent - Not Specified
                Not Specified