SWI-Prolog/npm-swipl-wasm

`Module.prolog` is `undefined` error in 3.2.0

jeswr opened this issue · 1 comments

jeswr commented

Somewhat confused as to why this happening since https://github.com/SWI-Prolog/npm-swipl-wasm/pull/106/files is successful.

EDIT ah it seems to be failing if I try and test the no-data file by using [require("../dist/swipl/swipl-bundle-no-data"), 'bundle-no-data'],. That said; the image generation test still works?

The problem might just boil down to the mismatch between the version of emscripten used to generate and run eyereasoner over in eye-js. This is further suggested by the fact that building eye-js on the main branch and then running tests on the updated branch succeeds.

Further confirmed by the fact that the tests work again on eyereasoner if swipl-bundled.temp.ts is set to be:

/* istanbul ignore file */
// This file is temporary until https://github.com/rla/npm-swipl-wasm/pull/8 is released.
// @ts-nocheck
export default require('swipl-wasm/dist/swipl/swipl-bundle-no-data');