-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
Description
Attach (recommended) or Link to PDF file
N/A
Web browser and its version
137.0.1
Operating system and its version
Arch Linux
PDF.js version
5.1.91+
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
- Change https://github.com/mozilla/pdf.js/blob/master/test/unit/pdf_spec.js#L142 from
ittofit. - Run
npx gulp unittestand notice that the test passes. - Run
npm install webpack@5.99.0(or higher; as of writing everything until the most recent 5.99.5 version is broken) - Run
npx gulp unittestand notice that the test fails withglobalThis.pdfjsLibbeing undefined:
TEST-UNEXPECTED-FAIL | checks that the viewer re-exports the expected API functionality | in firefox | TypeError: globalThis.pdfjsLib is undefined in http://127.0.0.1:43601/web/pdfjs.js (line 67)
TEST-UNEXPECTED-FAIL | checks that the viewer re-exports the expected API functionality | in chrome | TypeError: Cannot destructure property 'AbortException' of 'globalThis.pdfjsLib' as it is undefined
What is the expected behavior?
The test should pass after the Webpack update.
What went wrong?
The test fails after the Webpack update.
Link to a viewer
No response
Additional context
It looks related to webpack/webpack#19394, but that was closed and I can't find other reports about similar issues. We should probably try to create a reduced test case that we can report upstream for this since it might be another case of that issue.
Reactions are currently unavailable