-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
sql-wasm.wasm file is not getting loaded correctly when invoked as a web worker #521
Comments
https://github.com/WebReflection/sqlite-worker uses sql.js under the hood and abstracts what you want to do in an easy api. |
Thanks for the input, but I would like to avoid another layer of abstraction. The current worker of |
hope this help you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
The responding
sql-wasm.wasm
file requested byworker.sql-wasm.js
doesn't get served correctly and thus leads to a 404 error. I am not sure if that is a bug which is native to next.js though and thus opened an issue there as well. I spend the last two to three days looking into lots of similar issues on github, but none seems to be a viable solution.Description
I try to invoke a web-worker in one of my pages like this:
(Please see my reproduction of the problem at Stackblitz)
When doing so I get served a 404 error as the
sql-wasm.wasm
file can't be find inside the build directory i.e.http://localhost:3000/_next/static/chunks/sql-wasm.wasm
.Question
Is this error due to the nature of the
locateFile()
function of emscripten or due to a mistake in how I configured the correspondingnext.config.js
file?ANY help is much appreciated!
The text was updated successfully, but these errors were encountered: