Search code examples
ioscordovapluginsregistryhttp-status-code-404

Error 404: cordova-plugin-file when trying to install cordova-plugin-zip for iOS


When trying to install the cordoba-plugin-zip using:

cordova plugin add https://github.com/MobileChromeApps/zip.git

as documented (https://github.com/MobileChromeApps/cordova-plugin-zip),

I get the below 404 error message. Has the cordova-plugin-file its trying to reference been moved? How can I tell the plugin to look for it elsewhere if so?

Installing "cordova-plugin-zip" for ios
Fetching plugin "cordova-plugin-file" via plugin registry
npm http GET http://registry.cordova.io/cordova-plugin-file
npm http 404 http://registry.cordova.io/cordova-plugin-file
Failed to install 'cordova-plugin-zip':Error: 404 Not Found: cordova-plugin-file

Solution

  • This plugin now depends on cordova-plugin-file (which is not available on cordova.io for now because it is an unreleased version of org.apache.cordova.file, see https://issues.apache.org/jira/browse/CB-8806). So this dependency needs to be installed from its GitHub repository, like this:

    cordova plugin add https://github.com/apache/cordova-plugin-file.git
    

    And then you can install cordova-plugin-zip:

    cordova plugin add https://github.com/MobileChromeApps/zip.git
    

    Note: if you use any other plugin dependending on org.apache.cordova.file (like org.apache.cordova.file-transfer or org.apache.cordova.media), you will have to replace them with their GitHub repositiories too.