PFViewer does not work with vite

1 Answer 168 Views
PDF Viewer
Ruy
Top achievements
Rank 1
Ruy asked on 10 Sep 2024, 07:47 PM
When start project after install deps I receive this error:
X [ERROR] Could not resolve "pdfjs-dist/build/pdf.worker.entry.js"

    node_modules/@progress/kendo-react-pdf-viewer/PDFViewer.mjs:20:7:
      20 │ import "pdfjs-dist/build/pdf.work...
         ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path
  "pdfjs-dist/build/pdf.worker.entry.js" as 
  external to exclude it from the bundle, which
  will remove this error.


Someone knows about that?


1 Answer, 1 is accepted

Sort by
0
Accepted
Svetoslav Dimitrov
Telerik team
answered on 12 Sep 2024, 07:48 AM

Hello, Ruy, and everyone who sees this forum post,

Our development team provided a fix for this issue which is now available in the dev version of KendoReact. Until the official release, you can:

  • Use the dev version
  • Rollback the "kendo-pdfviewer-common" package to version 0.2.10

Regards,
Svetoslav Dimitrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
PDF Viewer
Asked by
Ruy
Top achievements
Rank 1
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or