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.

Cannot read property 'catch' of undefined

See original GitHub issue

I get an error in the browser when I was using Vue-pdf. The error information

TypeError: Cannot read property 'catch' of undefined
    at PDFJSWrapper.renderPage (new.web.c42b3b.js:formatted:72084)
    at a.resize (new.web.c42b3b.js:formatted:36592)
    at Ht (vendors.web.bebfbe.js:1)
    at a.n (vendors.web.bebfbe.js:1)
    at Ht (vendors.web.bebfbe.js:1)
    at a.t.$emit (vendors.web.bebfbe.js:1)
    at a.handler (new.web.c42b3b.js:formatted:36474)
    at Ht (vendors.web.bebfbe.js:1)
    at dn.run (vendors.web.bebfbe.js:1)
    at hn (vendors.web.bebfbe.js:1)

but, This error isn’t caught in the local environment. My code

import pdf from 'vue-pdf/src/vuePdfNoSssNoWorker'
import 'pdfjs-dist/build/pdf.worker.entry.js'

<pdf :src="resumeUrl" v-for="i in pdfPageCountNum" :key="i" :page="i" ></pdf>

Vue-pdf version

"vue-pdf": "^4.0.12",

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:20

github_iconTop GitHub Comments

7reactions
re-doccommented, Jun 29, 2021

“pdfjs-dist”: “^2.5.207”, “vue-pdf”: “^4.2.0” 亲测可以解决

3reactions
ramonakiracommented, Jul 19, 2021
"pdfjs-dist": "^2.5.207",
"vue-pdf": "^4.0.12",

After a lot of trial and error this is the only thing that worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: TypeError: Cannot read property 'catch' of undefined ...
javascript - Error: TypeError: Cannot read property 'catch' of undefined when trying to register user for website node. js - Stack Overflow. ...
Read more >
TypeError: Cannot read property 'catch' of undefined - Reddit
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Resolving the JavaScript Promise Error "TypeError: Cannot ...
TypeError - Cannot read property 'then' of undefined is thrown when the caller is expecting a Promise to be returned and instead receives ......
Read more >
TypeError: Cannot read property 'catch' of undefined #545
The issue I'm having is this: I'm sending bot responses passing an object and not a simple string, and when I do this,...
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