question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blueprintjs + PDF.js (by way of react-pdf) causes error

See original GitHub issue

Configuration:

  • 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:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brandonroscommented, Oct 24, 2017

I have this error without any involvement of BlueprintJS. Any advice? Does rolling back to a different version do anything worthwhile?

0reactions
nschwan94commented, Jan 3, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found