Replies: 2 comments 1 reply
-
Also worth noting that this error disappears when building, it only happens in dev mode. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Even though I know little about the bundler backend, I'm pretty sure any name should work just fine from Unfortunately, as much as I would like to help here, I know nothing about SvelteKit or Vite to understand what exactly is going on here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Bug
When running some functions that I have exported from Rust, I get
TypeError: wasm is undefined
. I noticed that this error gets thrown from inside thegetUint8Memory0
function, so only functions that need it throw this error.I also noticed that my Wasm package wasn't called
wasm
, and wasn't atnode_modules/wasm
. Renaming it back towasm
fixed everything.Steps to Reproduce
See lafkpages/wasm-bindgen-error-repro.
This is a simple example that uses SvelteKit and Vite for a bundler, and produces the error described above (tested on Firefox 116). If you
git reset --hard
the latest commit in the repo, everything works fine.Expected Behavior
I should be able to name my package whatever I want with no problems.
Actual Behavior
I can only call the package
wasm
or I get the above errors.Additional Context
All above ^^
Beta Was this translation helpful? Give feedback.
All reactions