Node Worker Threads (--experimental-worker)

466 views
Skip to first unread message

bastian....@timebro.de

unread,
May 2, 2019, 7:02:04 PM5/2/19
to nw.js
Hello,

how do I enable nodes worker threads in nwjs? (https://nodejs.org/docs/latest-v11.x/api/worker_threads.html)

I tried passing "--experimental-worker" via chromium-args as well as via js-args and both, but all I get is "The V8 platform used by this instance of Node does not support creating Worker"

I tried using Web Workers with "--enable-node-worker" before, but I cannot load native modules if they are already loaded in the main thread, especially sqlite. (Uncaught Error: Module did not self-register.)

I do know that the node team worked on exact that issue with worker threads in the past, but I cannot enable it in nwjs.

I currently use nw version 0.37.4 (with node 11.14.0 which supports worker threads) and i cannot update to a newer version due to missing third party support for node 12.

How do I pass the "--experimental-worker" ? How can I enable that feature?
I cannot find documentation for node flags.

bastian....@timebro.de

unread,
May 3, 2019, 3:23:06 AM5/3/19
to nw.js
I found another solution to solve my problem. But I would still be interested in the general flow of nodejs flags. How can we pass them on?

yexing huang

unread,
Jul 11, 2022, 8:46:01 AM7/11/22
to nw.js
can you tell me how to save this issues, thanks
Reply all
Reply to author
Forward
0 new messages