Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set properties of undefined (setting 'workerSrc') #108

Open
YaoZhouZ opened this issue May 13, 2024 · 4 comments
Open

Cannot set properties of undefined (setting 'workerSrc') #108

YaoZhouZ opened this issue May 13, 2024 · 4 comments

Comments

@YaoZhouZ
Copy link

File:
/Users/edy/Desktop/project/lightpdf/node_modules/.pnpm/@TaTo30+vue-pdf@1.9.6_vue@3.4.20/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:

@TaTo30
Copy link
Owner

TaTo30 commented May 13, 2024

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

@YaoZhouZ
Copy link
Author

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

@YaoZhouZ
Copy link
Author

image

@TaTo30
Copy link
Owner

TaTo30 commented May 26, 2024

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

imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants