Hey, I tried to run <https://github.com/linux-chin...
# webassembly
a
Hey, I tried to run https://github.com/linux-china/kotlin-wasm-node-demo after changing the version to
1.8.20-Beta
, but was not able to. Basically, the command
~/.gradle/nodejs/node-v19.6.0-darwin-x64/bin/node --experimental-wasm-gc ~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.mjs
failed with the following error message:
Copy code
file://~/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.uninstantiated.mjs:140
        const wasmModule = new WebAssembly.Module(wasmBuffer);
                           ^

CompileError: WebAssembly.Module(): Compiling function #16:"kotlin.collections.IteratorImpl.hasNext" failed: i32.trunc_f64_s[0] expected type f64, found call_ref of type i32 @+14179
    at instantiate (file://~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.uninstantiated.mjs:140:28)
    at async file://~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.mjs:3:17
Is this a known issue?
s
Hey, can you try it with v20.0.0-v8-canary202212266b2b946a63 as described in https://github.com/sdeleuze/kowasm#node?
This error could mean that V8 is too old, or it could be an unknown to us bug otherwise
a
Thanks for the fast response, the latest node version did the trick indeed 👍