_Pear
_Pear
Explore posts from servers
CDCloudflare Developers
Created by _Pear on 3/3/2024 in #pages-help
Trouble initializing wasm in SvelteKit
I am trying to use some of these @jsquash dependencies in a Pages app build with Sveltekit. I am able to get things building but when initializing the wasm during runtime, I get the following error:
Error: The 'credentials' field on 'RequestInitializerDict' is not implemented.
Error: The 'credentials' field on 'RequestInitializerDict' is not implemented.
I have searched the discord and seen some answers like "patch the module so it doesn't use credentials", and in this case it seems like vite's load is the thing using credentials. Has anybody had success using this or similar modules in SvelteKit on Pages and can give any advice? I've also tried the instructions here: https://github.com/jamsinclair/jSquash/blob/main/examples/cloudflare-worker-esm-format/src/index.js but those didn't work. Ideally I would make this work in SvelteKit itself and not need a separate worker, but that seems to be where this is leading. Thanks!
1 replies
CDCloudflare Developers
Created by _Pear on 2/27/2024 in #workers-help
Error: Handler does not export a fetch() for scheduled worker locally
Hi, I'm a bit confused. I just ran this scheduled worker locally using wrangler dev and hit the endpoint the curl command from the docs and it worked fine: curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*" I tried again at a later time and got the following error:
Error: Handler does not export a fetch()
Error: Handler does not export a fetch()
I don't understand why it worked then started failing like this. Any suggestions?
3 replies