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

Failing to compile web-worker during vite build #42

Open
projjal1 opened this issue Oct 25, 2023 · 1 comment
Open

Failing to compile web-worker during vite build #42

projjal1 opened this issue Oct 25, 2023 · 1 comment

Comments

@projjal1
Copy link

During compilation with vite build, the compiler is giving error message as cannot destructure property mod from threads.workerData as it's undefined.

@chanmathew
Copy link

chanmathew commented Nov 25, 2023

Had the same issue, I think in line 130 in node.js we need to check if threads.workerData is undefined, or set it as an empty object. This should fix it:

  let {
    mod,
    name,
    type
  } = threads.workerData || {};

UPDATE: Looks like the author already had a fix for the root cause here: #40

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