-
Notifications
You must be signed in to change notification settings - Fork 0
Uncaught TypeError: can't convert BigInt to number #1
Copy link
Copy link
Open
Description
Hi, I was testing this project and got this error: Uncaught TypeError: can't convert BigInt to number. Luckily the solution was easy so I'm posting it here in case anyone else has this issue, adding this line to build.zig fixed it:
emcc_linker.addArgs(&.{ "-s", "WASM_BIGINT=1" });
Here's the errors printed to the console:
warning: running JS from STANDALONE_WASM without WASM_BIGINT will fail if a syscall with i64 is used (in standalone mode we cannot legalize syscalls) [game.mjs:12195:4](http://localhost:8000/zig-out/lib/game.mjs)
Module http://localhost:8000/zig-out/lib/game.mjs:12195
<anonymous> http://localhost:8000/:17
Uncaught TypeError: can't convert BigInt to number
convertI32PairToI53Checked http://localhost:8000/zig-out/lib/game.mjs:3834
_clock_time_get http://localhost:8000/zig-out/lib/game.mjs:3839
Module http://localhost:8000/zig-out/lib/game.mjs:634
init http://localhost:8000/:25
<anonymous> http://localhost:8000/:50
Cheers and thanks for taking the time of figuring all this out!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels