Skip to content

Getting a WebAssembly error from yoga-layout from #21

@johnhaley81

Description

@johnhaley81

Running npm i -g happy-coder and then happy yields this error:

failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): section (code 1, "Type") extends past end of the module (length 7299055, remaining bytes 81343) @+8
Aborted(CompileError: WebAssembly.instantiate(): section (code 1, "Type") extends past end of the module (length 7299055, remaining bytes 81343) @+8)
file:///opt/homebrew/lib/node_modules/happy-coder/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js:13
function x(a){if(h.onAbort)h.onAbort(a);a="Aborted("+a+")";v(a);ha=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ca(a);throw a;}function ua(a){return a.startsWith("data:application/octet-stream;base64,")}var H;H="data:application/octet-stream;base64,
// Truncated very large binary output of WASM function
if(!ua(H)){var va=H;H=h.locateFile?h.locateFile(va,q):q+va}
                                                                        ^

RuntimeError: Aborted(CompileError: WebAssembly.instantiate(): section (code 1, "Type") extends past end of the module (length 7299055, remaining bytes 81343) @+8). Build with -sASSERTIONS for more info.
    at x (file:///opt/homebrew/lib/node_modules/happy-coder/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js:13:73)
    at file:///opt/homebrew/lib/node_modules/happy-coder/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js:63:418

Node.js v24.7.0

I've ran this from brew using the latest node and in fnm using node v24.7.0 and node v22, neither work.

However, cloning this repo and running it locally works just fine in all versions. I was able to npm i -g ~/repos/happy-cli and get that to run no problem.

I thought maybe there was an issue with the published version of yoga-layout so I overrode the happy-coder/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js with the one of working copy but that did not fix the error so it must be something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions