marcdacz / compare-pdf

Standalone node module that compares pdfs
MIT License
62 stars 21 forks source link

"Error: Cannot find module 'pdfjs-dist/es5/build/pdf.js'" with latest pdfjs-dist (2.8.335) #10

Closed khansen closed 3 years ago

khansen commented 3 years ago

https://github.com/marcdacz/compare-pdf/blob/master/functions/engines/native.js#L1

https://github.com/mozilla/pdf.js/releases/tag/v2.8.335 In https://github.com/mozilla/pdf.js/pull/12978, the "es5" folder was renamed to "legacy".

Workaround is to pin pdfjs-dist to v2.7.570 (the last release that has the es5 folder).

khansen commented 3 years ago

Interesting that https://github.com/mozilla/pdf.js/pull/12978 is flagged as a minor change -- not major. Either that's a mistake, or consumers aren't supposed to import files from that folder directly.

BelloAdi commented 3 years ago

what is the status?..

Hi @khansen :) did you find any solution?

khansen commented 3 years ago

@BelloAdi We still have the workaround in place (pin pdfjs-dist to v2.7.570 in our package.json).

marcdacz commented 3 years ago

Fixed in v1.1.5 I've bumped up the version of pdf.js as well. Thanks for your patience.