Open ildar945k opened 3 months ago
Some users are getting error trying to preview pdf:
Can't find variable: on
`
"react-pdf": "9.0.0", "pdfjs-dist": "4.3.136", "webpack": "5.90.3", "react": "18.2.0",
if (typeof Promise.withResolvers === "undefined") { if (window) { window.Promise.withResolvers = function() { let resolve, reject; const promise = new Promise((res, rej) => { resolve = res; reject = rej; }); return { promise, resolve, reject }; }; } } pdfjs.GlobalWorkerOptions.workerSrc = new URL( "pdfjs-dist/legacy/build/pdf.worker.min.mjs", import.meta.url ).toString();
``
No way to repro
No error
Error
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.
Before you start - checklist
Description
Some users are getting error trying to preview pdf:
Can't find variable: on
` at webpack:///node_modules/pdfjs-dist/build/pdf.mjs. line: 15417. column: 38. name: at webpack:///node_modules/pdfjs- dist/build/pdf.mjs. line: 18573. column: 0. name: at webpack:///webpack/bootstrap. line: 19. column: 36. name: module at webpack:///node_modules/react-pdf/dist/cjs/index.js
`
"react-pdf": "9.0.0", "pdfjs-dist": "4.3.136", "webpack": "5.90.3", "react": "18.2.0",
``
Steps to reproduce
No way to repro
Expected behavior
No error
Actual behavior
Error
Additional information
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
Environment