Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
When I build my project with 'cordova build browser', a zip file will be created under the build folder. When I unzip that folder I get the following errors for certain files:
error: invalid compressed data to inflate
It seems that the problem lays in the adm-zip module used to create that zip package. Other people have reported the same issue in the issue tracker of adm-zip (https://github.com/cthackers/adm-zip/issues/102).
This could be solved by using another archiver module like https://github.com/ctalkington/node-archiver as suggested by another user in the issue tracker of adm-zip.
Attachments
Issue Links
- links to
Same here. Sam could you share how you worked around this? I only started looking into it. If not, I'll provide a workaround tomorrow.
My deploy script currently does this:
cordova build browser --release
scp platforms/browser/build/package.zip $SERVER:$FOLDER
ssh $SERVER 'cd '$FOLDER';unzip -o package.zip;rm package.zip'
and sound and font files cause issues.
========
Edit: looks like the build browser script doesn't do anything special.
platforms/browser/cordova/lib/build.js:
platformWwwDir = path.join('platforms', 'browser', 'www'),
var zipFile = zip();
zipFile.addLocalFolder(platformWwwDir, '.');
zipFile.writeZip(packageFile);
seam to be all the lines relevant here, so I will just zip it up myself or rsync or something.