Blueprintjs + PDF.js (by way of react-pdf) causes error
See original GitHub issueConfiguration:
- Web browser and its version: Electron v1.6
- Operating system and its version: Mac OSX
- PDF.js version:
pdf.js-dist@^1.9.476
- copdependency of
react-pdf@^2.0.0
Steps to reproduce the problem:
https://github.com/nschwan94/electron-react-boilerplate on branch blueprintjs_reactpdf_issue
, install packages and execute dev
npm script. When @blueprintjs/core
is imported in Home.js
component error is thrown, when it is not imported there is no error.
Error is:
Uncaught TypeError: Cannot read property 'PDFJS' of undefined
at Object.defineProperty.value (pdf.js:13270)
at __w_pdfjs_require__ (pdf.js:45)
at Object._typeof (pdf.js:7416)
at __w_pdfjs_require__ (pdf.js:45)
at Object.defineProperty.value (pdf.js:88)
at pdf.js:91
at webpackUniversalModuleDefinition (pdf.js:18)
at Object../app/node_modules/pdfjs-dist/build/pdf.js (pdf.js:25)
at __webpack_require__ (bootstrap 53283a0…:686)
at fn (bootstrap 53283a0…:105)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Getting error when displaying a PDF file using react-pdf
I integrated the file uploader from the base UI and tried to display the uploaded file using react-pdf package. I tried converting the...
Read more >Solving Pdf Preview Nightmare - Medium
We need to add pdf preview initialization inside useEffect. Now let's add Mozilla pdf.js code copied from their [example folder](https://github.
Read more >Experts for merge lodash - Linknovate
Name Score News
GitHub 124.1 12
John Doe B.V. 73.8 2
Dropbox LLC 62.1 3
Read more >How to Fix a 401 Unauthorized Error? - GeeksforGeeks
Methods to rectify the error: The 401 Unauthorized error can be fixed by using any of the following ways: Check The URL: Due...
Read more >Index of /
@react-pdf ... acorn-private-methods, Thu Jun 16 09:21:54 UTC 2022, 34339 ... api-error-handler, Sun Jun 19 08:50:17 UTC 2022, 4807.
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
I have this error without any involvement of BlueprintJS. Any advice? Does rolling back to a different version do anything worthwhile?
sorry guys, this ended up being a messed up webpack config on my part. turns out when all the signs point to a configuration issue… it’s not a dependency issue.