-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
No workerHelpers.worker.js
generated & ReferenceError: Window is not defined
#16
Comments
+1 Exactly in the same situation... |
Got around the error by copy-pasting this file: https://github.com/RReverser/wasm-bindgen-rayon/blob/main/src/workerHelpers.worker.js But I am not able to get passed |
Yes, seems that copy-pasting the file helped (partially), but I'm still getting both the following errors in my own project
&
I was able to avoid the "ReferenceError: Window is not defined" in my own project by closing the DevTools window and refreshing. |
workerHelpers.worker.js
generated in pkg/snippets/wasm-bindgen-rayon-[hash]/src
workerHelpers.worker.js
generated & ReferenceError: Window is not defined
workerHelpers.worker.js
generated & ReferenceError: Window is not defined
workerHelpers.worker.js
generated & Maximum call stack size exceeded
workerHelpers.worker.js
generated & Maximum call stack size exceeded
workerHelpers.worker.js
generated & ReferenceError: Window is not defined
Same problem here |
rustwasm/wasm-bindgen#4233 (comment) Revert to wasm-bindgen 0.2.93 to fix. The current latest version 0.2.95 has a regression which breaks Line 59 in 09ade9b
|
Initially, I was receiving the following error
from the
.../pkg/snippets/wasm-bindgen-rayon-[hash]/src/workerHelpers.worker.js?worker_file&type=module
in the browser.After investigating, I realized there is no
workerHelpers.worker.js
generated in the/pkg/snippets/wasm-bindgen-rayon-[hash]/src/
of my project. It only containedworkerHelpers.js
.I attempted to compile both the
demo/
andtest/
directories inside thewasm-bindgen-rayon
workspace, and in those cases, theworkerHelpers.worker.js
file was generated successfully. However, when I tried to create a standalone project, the file was not generated, even when I just copied thetest/
directory outside of the workspace (and updated its dependencies).The command I was using is
$ wasm-pack build --target web
, and I did not encounter any errors.Thank you so much for any guidance!
The text was updated successfully, but these errors were encountered: