Skip to content

Update wasm-bindgen and wasm-pack to resolve ReferenceError #888

@mtoohey31

Description

@mtoohey31

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 Menci/vite-plugin-wasm#8 (comment). It sounds like that was resolved by wasm-bindgen/wasm-bindgen#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions