workers-sdk
workers-sdk copied to clipboard
🐛 BUG: wrangler dev wasm not working
What version of Wrangler are you using?
2.0.25
What operating system are you using?
Linux
Describe the Bug
I have installed the wrangler2 using the following command:
npm --location=global i wrangler@latest
I got the latest version of wrangler
wrangler -v
⛅️ wrangler 2.0.25
When I try to run my wasm module using wrangler dev I get the following error:
✘ [ERROR] No loader is configured for ".wasm" files: target/wasm32-wasi/release/hello-world.wasm
Yeah, it's broken. Same thing on Windows, and when trying to publish
@threepointone Did you get it working on your end, with your recent fixes?
To help us diagnose this further, would you be able to provide some more information about your environment? Specifically, the contents of your wrangler.toml would be really useful—thanks!
Hey 👋 ! We haven't heard from you about this so we are going to close this. If you have further clarification on this please feel free to reopen this, or open another issue with some more details
I hit the exact same issue when following the steps in this blog post
Seems like everything in that blog post just doesn't work:tm:
For instance also: https://hexly.examples.workers.dev/ 404's
fwiw here's my wrangler.toml
name = "cf-workers-test"
compatibility_date = "2022-09-30"
And how I got there:
> wrangler2 dev target/wasm32-wasi/release/hello_world.wasm
But also, did this ever work? https://github.com/cloudflare/wrangler2/blob/main/packages/wrangler/src/entry.ts#L156
@cameron-robey @penalosa
It looks like one way to work around the problem is to set up a rollup build and treat the wasm bundle as an external. I found an example of that here: https://github.com/ssssota/svg2png-worker .
That said, it would be great if wasm worked out of the box.