gildas-lormeau / zip.js

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
https://gildas-lormeau.github.io/zip.js
BSD 3-Clause "New" or "Revised" License
3.38k stars 510 forks source link

nodejs v16.16.0 [BUG] CommonJS require! #418

Closed gowy222 closed 1 year ago

gowy222 commented 1 year ago

"@zip.js/zip.js": "^2.7.14",

I tried: const zip = require("@zip.js/zip.js"); ERR: class Crc32Stream extends TransformStream { ^ ReferenceError: TransformStream is not defined


also tried: require.resolve('@zip.js/zip.js/dist/zip-fs-full.min.js'); =>'./dist/zip-full.min.js' is not defined by "exports"


I wanna to addup zip to my project, fully CommonJS type! can NOT change package.json module type, cus a big project within 30+ CommonJS packages,... any idea to use require() in nodejs ?

Rajek88 commented 1 year ago

Did you find the solution ?

On Thu, 1 Jun 2023, 12:00 pm gowy222, @.***> wrote:

Closed #418 https://github.com/gildas-lormeau/zip.js/issues/418 as completed.

— Reply to this email directly, view it on GitHub https://github.com/gildas-lormeau/zip.js/issues/418#event-9398863868, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMJDGIFQI4ZSFDWKIPI55X3XJAZGZANCNFSM6AAAAAAYWIVYQI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

gildas-lormeau commented 1 year ago

@Rajek88 update Node.js.

Rajek88 commented 1 year ago

Sure, thanks for letting me know.

On Thu, 1 Jun 2023, 3:11 pm Gildas, @.***> wrote:

@Rajek88 https://github.com/Rajek88 update Node.js.

— Reply to this email directly, view it on GitHub https://github.com/gildas-lormeau/zip.js/issues/418#issuecomment-1571703512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMJDGIESRKSKZIDE6I4BLT3XJBPUNANCNFSM6AAAAAAYWIVYQI . You are receiving this because you were mentioned.Message ID: @.***>