Error: Cannot find module 'worker-loader!./build/pdf.worker.js'
See original GitHub issueimport pdfjs from "pdfjs-dist/webpack.js";
results in:
Error: Cannot find module ‘worker-loader!./build/pdf.worker.js’
npm list webpack worker-loader pdfjs-dist
+-- pdfjs-dist@2.0.943
| `-- worker-loader@2.0.0 deduped
+-- webpack@4.35.0
`-- worker-loader@2.0.0
What could be a reason for that? The suggestion was:
You can use the pdfjs-dist/webpack module for PDF.js autoconfiguration. 😄
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Issues - GitHub
build/pdf.worker.js' Error: Cannot find module 'worker-loader!./build/pdf.worker.js' at Function.Module._resolveFilename (module.js:485:15) ...
Read more >Looking for help to make npm/pdfjs-dist work with Webpack ...
Module not found: Error: Can't resolve 'module' in ... Which is attempting to load pdf.worker.js (which worker-loader should be packaging) ...
Read more >Compile and set the worker source with Webpack
This post demonstrates a simple way that uses the Webpack bundler to compile and set up the worker source based on the current...
Read more >worker-loader - webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Using worker_threads in Node.js - Medium
throw err; ^Error: Cannot find module 'worker_threads' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15) at Function.Module.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@timvandermeij
so, how we can use it now?
import pdfjs from "pdfjs-dist/webpack.js";
not works already.Install
worker-loader
and try again: