依赖安装后报错

TypeError: Cannot read properties of undefined (reading 'catch')
    at PDFJSWrapper.renderPage (pdfjsWrapper.js?a068:196)
    at VueComponent.resize (componentFactory.js?0d60:75)
    at invokeWithErrorHandling (vue.esm.js?a026:1872)
    at VueComponent.invoker (vue.esm.js?a026:2197)
    at invokeWithErrorHandling (vue.esm.js?a026:1872)
    at VueComponent.Vue.$emit (vue.esm.js?a026:3912)
    at VueComponent.handler (resize-sensor.vue?c7ed:49)
    at invokeWithErrorHandling (vue.esm.js?a026:1872)
    at Watcher.run (vue.esm.js?a026:4593)
    at flushSchedulerQueue (vue.esm.js?a026:4335)

 

锁定依赖版本即可解决

npm i pdfjs-dist@2.5.207

npm i vue-pdf@4.2.0

 

pacakge.json

"pdfjs-dist": "2.5.207",

"vue-pdf": "4.2.0"

相关文章:

  • 2022-12-23
  • 2021-08-19
  • 2021-10-20
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2023-02-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-01-06
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
相关资源
相似解决方案