ceifa / wasmoon

A real lua 5.4 VM with JS bindings made with webassembly
MIT License
480 stars 31 forks source link

Integrating with very old node version #111

Closed Vicinity4519 closed 6 months ago

Vicinity4519 commented 6 months ago

I have an electronjs app (v11.4.9) that is forced to used node v12.18.3, trying the following code in a html script tag throws a node version mismatch error:

<script src="https://cdn.jsdelivr.net/npm/wasmoon@1.16.0/dist/index.min.js"></script>
<script>
    const lf = new wasmoon.LuaFactory();  // Error: This emscripten-generated code requires node v16.0.0 (detected v12.18.3)
</script>

Would it be possible to run wasmoon in this environment or should I just continue to use fengari?

ParadiseFallen commented 6 months ago

no you can't. i belive @ceifa won't downgrade it (even if it possible). Why it's forced to be that old?

ceifa commented 6 months ago

Wasmoon don't require node. Looking at your piece of code it looks like you are trying to run wasmoon on a web environment, why does you need node?

Vicinity4519 commented 6 months ago

Wasmoon don't require node. Looking at your piece of code it looks like you are trying to run wasmoon on a web environment, why does you need node?

I understand my problem better now, thanks you.

My solution

const window = new BrowserWindow({
    webPreferences: {
        //nodeIntegration: true, remove
   }
});