Closed kenorb closed 1 week ago
@kenorb Are you using a bundler?
I'm using php-wasm v0.0.5 in NextJS as part of this repo.
Here is the line which I'm changing to PhpWebDrupal
(which generates the error):
Are you waiting for ready
to fire?
php.addEventListener('ready', () => {
php.run('<?php echo "Hello, world!";');
});
Tested with ready
state, same error. Works for PhpWeb, but not for PhpWebDrupal.
It's possible that this can be Next.js specific, and it has trouble loading code in PhpWebDrupal.js properly.
Hmmm, on a hunch, does it work if you await require
the asm2wasm module before the php-wasm module?
I've tried, my friend tried, and we think something is missing in .wasm file, like asm2wasm
(f64-rem and debugger) wasn't compiled into the file it-self or it was compiled for the different environment (not ENVIRONMENT=browser).
It happens when I'm trying to run
PhpWebDrupal
in the app by:In comparison, PhpWeb is loading without this error.