You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.
PdfjsLib library uses worker-loader to load pdf worker.
Expecting for webpack to build just fine.
Actual Behavior
Building gives the following error:
ERROR in ./node_modules/pdfjs-dist/build/pdf.worker.js (./node_modules/worker-loader/dist/cjs.js?esModule=false&filename=[name].js!./node_modules/pdfjs-dist/build/pdf.worker.js)
Module build failed (from ./node_modules/worker-loader/dist/cjs.js):
TypeError: chunkFilename.replace is not a function
at getDefaultChunkFilename (/node_modules/worker-loader/dist/utils.js:23:24)
at Object.pitch (/node_modules/worker-loader/dist/index.js:61:108)
@alexander-akait when using that approach all my jest tests that are importing the module that uses that syntax explodes. It's due to this issue, which seems to be unfixable atm.
There is already a long-lived issue open that aims to solve this problem here. Haven't been diving into the specifics too much, but from my understanding this is not a problem that is easily fixed.
Just noticed that it seems to be fixed in jest 27 though. See this comment.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behavior
PdfjsLib library uses worker-loader to load pdf worker.
Expecting for webpack to build just fine.
Actual Behavior
Building gives the following error:
ERROR in ./node_modules/pdfjs-dist/build/pdf.worker.js (./node_modules/worker-loader/dist/cjs.js?esModule=false&filename=[name].js!./node_modules/pdfjs-dist/build/pdf.worker.js)
Module build failed (from ./node_modules/worker-loader/dist/cjs.js):
TypeError: chunkFilename.replace is not a function
at getDefaultChunkFilename (
/node_modules/worker-loader/dist/utils.js:23:24)/node_modules/worker-loader/dist/index.js:61:108)at Object.pitch (
webpack compiled with 1 error
Code
How Do We Reproduce?
Try to run the above code with the versions mentioned
The text was updated successfully, but these errors were encountered: