Emscripten attempts to use node's worker_threads module in an electron app BrowserWindow (nodeIntegration: true), which will successfully require('worker_threads') but attempting to contstruct a Worker will fail with "worker threads are not supported in this node environment".
Emscripten should either detect the electron environment and use Web workers, or prefer Web Workers in all cases.