After struggling for a bit I got the wasm version to run in the browser but the second I instansiate stockfish by doing:
Stockfish().then((sf) => {
sf.addMessageListener((line) => {
console.log(line);
});
sf.postMessage("uci");
});
It will print this in the console:
pthread sent an error! undefined:undefined: undefined
I looked up and it seems that pthread is related to webassembly internals? Anyone know how to fix this or why this error occurs?