I got this problem when I run this code in index.ts with Deno.
const wasm = await Deno.readFile("./wasm_test/pkg/wasm_test_bg.wasm");
const wasmModule = new WebAssembly.Module(wasm);
const wasmInstance = new WebAssembly.Instance(wasmModule);
const wasmTest = wasmInstance.exports;
wasmTest.sum(1, 3); // Error
Error: This expression is not callable. No constituent of type 'ExportValue' is callable.
I get and error when calling sum, it should give me a 4 as a result.
When I run it as index.js it works perfectly.
I used wasm-pack to compile the Rust code.