I have a wasm file which I instantiate using WebAssembly.instantiate
which works perfectly when I run it locally. However, when I run this inside our Github Actions CI pipeline, I get the following error:
LinkError: WebAssembly.instantiate(): Import #1 module="runtime" function="printErrorMessage" error: function import requires a callable
I'm looking for advice on how to debug this, I've checked that I'm using the same version of node on both, but beyond that I'm not sure what else to explain this with. Thank you in advance for any pointers!
When the module is instantiated you have to supply the printErrorMessage
function, because the module has it imported.
If you instantiate it with some JavaScript locally, then this function is supplied, and so it works.
On the other Actions
side, it is not supplied during the module instantiation and the linker outputs this error message.