nika-begiashvili / libarchivejs

Archive library for browsers
MIT License
288 stars 35 forks source link

'worker-bundle' file alwsys throw error like 'Uncaught SyntaxError: Unexpected token '<'' #26

Closed DilsSpec closed 4 years ago

DilsSpec commented 4 years ago

like this , my vue project want to unzip some zipfile, so import your 'libarchive.js' to do this, but in the browser always thorw an error like Uncaught SyntaxError: Unexpected token '<', there is my code: Archive.init('../../node_modules/libarchive.js/dist/worker-bundle.js'); const archive = await Archive.open(zipFile); let obj = await archive.extractFiles(); console.log(obj); zipfile is my zipfile and init path is true or empty always throw this error. my English is not good, washing your reply.

nika-begiashvili commented 4 years ago

could you give me line number and related code where it throws error ?

hxlyd commented 4 years ago

https://github.com/nika-begiashvili/libarchivejs/issues/13#issuecomment-531127643 @zzy5921