StyLua icon indicating copy to clipboard operation
StyLua copied to clipboard

Update wasm-bindgen and wasm-pack to resolve ReferenceError

Open mtoohey31 opened this issue 1 year ago • 1 comments

Hello! I'm trying to use the npm package via vite-plugin-wasm, but I'm running into the following error:

Uncaught ReferenceError: Cannot access 'memory' before initialization
    at stylua_lib_bg.js?v=4e2ee103:671:42
(anonymous) @ stylua_lib_bg.js?v=4e2ee103:671

I believe this error is the same as https://github.com/Menci/vite-plugin-wasm/issues/8#issuecomment-1193187290. It sounds like that was resolved by https://github.com/rustwasm/wasm-bindgen/pull/2965, but that fix is only present in wasm-bindgen 0.2.82 and onwards (but this project is using 0.2.81). I was wondering if you'd have any problem with updating things to incorporate the fix.

mtoohey31 avatar Aug 25 '24 15:08 mtoohey31

Nope no problems, we can update this. Also happy to accept a PR to do so

JohnnyMorganz avatar Oct 26 '24 18:10 JohnnyMorganz