-
Greetings! I'm a big fan of Yarn 2. Thanks @arcanis et al! Lately, I've been wrestling with mozilla/pdfjs-dist. I've created a repo that repros the issues, and I submitted mozilla/pdf.js#12778. However, they immediately closed the issue because they don't do Yarn 2. Maybe you guys can help me sort this out: From what I gather, when used in conjunction with webpack, pdfjs relies on worker-loader. In fact, they have a "zero-config" wepback entry point which automatically configures work-loader, accessed via
(Note that, somewhere in their issues section, I read that pdfjs-dist relies on worker-loader ^2, whereas ^3 will break. Hard to tell without any deps listed in the package.json, but anyway) This is progress:
When I extend worker-loader's deps with webpack, whether ^4 or ^5, both cases get me here: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hello, tested your repro and as the error shows (sort of) they lack an optional(?) peer dependency on packageExtensions:
'pdfjs-dist@*':
peerDependencies:
worker-loader: '^3'
It's one of the options for |
Beta Was this translation helpful? Give feedback.
-
Wow, thanks! If you don't mind my asking, how did you discover that info? I had a hard time finding it. Anyway, in this case, there may be some additional issue(s) :/ I updated the package extensions as recommended in this repo, but I'm getting the same result ( |
Beta Was this translation helpful? Give feedback.
-
Oh, doh, I got it: I still had worker-loader@^2 "manually" installed as a dep. Changed that to ^3 as well, and it works now. Thank you. You are a genius. |
Beta Was this translation helpful? Give feedback.
-
I ran |
Beta Was this translation helpful? Give feedback.
Hello, tested your repro and as the error shows (sort of) they lack an optional(?) peer dependency on
worker-loader@^3
It's one of the options for
worker-loader@^3