vue-pdf icon indicating copy to clipboard operation
vue-pdf copied to clipboard

Cannot set properties of undefined (setting 'workerSrc')

Open YaoZhouZ opened this issue 1 year ago • 3 comments

File: /Users/edy/Desktop/project/lightpdf/node_modules/.pnpm/@[email protected][email protected]/node_modules/@tato30/vue-pdf/dist/index.mjs:741:35 Code: 740 | function vl(l) { > 741 | D.GlobalWorkerOptions.workerSrc = l; | ^ 742 | } 743 | function fl(l, d = { 744 | onProgress: void 0, Stacktrace:

YaoZhouZ avatar May 13 '24 03:05 YaoZhouZ

That error is common when SSR frameworks are used, Try wrapping the component with some "client-only" component or directive.

TaTo30 avatar May 13 '24 03:05 TaTo30

I used astro for development and I used the instructions for client rendering image But the error remains unresolved image

YaoZhouZ avatar May 13 '24 06:05 YaoZhouZ

image

YaoZhouZ avatar May 13 '24 06:05 YaoZhouZ

I have not used astro but after some research I found this:

imagen

TaTo30 avatar May 26 '24 22:05 TaTo30