WASM version of SWC.RC errors only in debug mode
NOTE: This is a bare bones example just to illustrate the problem: we aren't transpiling anything just getting the wasm to init.
basic setup:
- swc.ts:
- .vscode/launch.json:
steps:
In the CLI run:
It should just run and quit OK with no errors.
Next in the CLI run with a debug flag:
and then attach the debugger (vscode: "Run and debug" the configured debugger ["debug"]).
You should see the console error:
3 Replies
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided in your message, I can offer some general advice.
The error message you're seeing suggests that the WebAssembly module is expecting a buffer source as an argument, but it's not receiving one. This could potentially be an issue with how the WebAssembly is being initialized or used within the
@swc/wasm-web
package when running in debug mode.
One thing to note is that the launch.json
configuration you've provided is for Node.js debugging, not Deno. Deno has its own debugger that can be used with Visual Studio Code. Here's an example of what the launch.json
configuration might look like for Deno:
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. If you continue to experience issues, you may want to reach out to the maintainers of the @swc/wasm-web
package or seek support from the Deno community for more specific guidance.@Treetop Flyer That sounds like a bug in Deno. Can you file an issue for that? https://github.com/denoland/deno/issues/new/choose
will do thank you!