Closed eafiontzi closed 2 years ago
Are you using the latest version of zip.js? The stack trace does not seem to correspond to zip.min.js
as it exists today. Alternatively and maybe more conveniently, what error is displayed if you replace require("../../../../../node_modules/@zip.js/zip.js/dist/zip.min.js");
with require("../../../../../node_modules/@zip.js/zip.js/dist/zip.js");
?
Hello, thank you very much for you answer,
The path you suggested gives the following error:
I have tried with
require("../../../../../node_modules/@zip.js/zip.js/dist/zip-full.js");
and it seems to be working. I will investigate more and if everything is in place I will close the issue.
Sorry, I didn't notice you disabled web workers support (see {useWebWorkers: false}
in your code). That's why it does not work with zip.js and zip.min.js but it does work with zip-full.js (see https://github.com/gildas-lormeau/zip.js/blob/master/dist/README.md). You should also be able to use zip-no-worker.min.js which is a bit ligther.
Hello all,
I have been trying to use zip.js in an Angular 11 project. To import the library I used this comment with NPM
I have been able to get all file entries using BlobReader and ZipReader
But when I try getting the actual data from one entry using the code from the ZipReader example (using either TextWriter or BlobWriter)
I get the error
I have seen this issue and actually console.log(zip) right after my import statement. I get the same object for BlobReader and BlobWriter, only BlobReader seems to work while BlobWriter not