electron-re icon indicating copy to clipboard operation
electron-re copied to clipboard

Attention of Electron child_process bugs!!

Open nojsja opened this issue 4 years ago • 2 comments

ChildProcessPool has abnormal behavior in electron production app.

nojsja avatar Dec 18 '20 04:12 nojsja

Fixed the crash of ChildProcessPool on [email protected]. DO NOT USE require(' Electron ') in the child process execution script, this will cause fatal error in the production environment. It's a bug of Electron, there is no solution yet.

nojsja avatar Dec 18 '20 09:12 nojsja

Besides that, In order to use ChildProcessPool, you need to place your child_process exec js file in an external directory such as ~/.config/. Otherwise, when you packaged your app, Node.js can not find that exec file.

The another way to solve this problem is to set asar to false in the electron-builder.json, this is not recommended but works.

{
   ...
   "asar": false,
   ...
}

nojsja avatar Sep 16 '22 13:09 nojsja