Fork and fs-extra in nwjs
NW.js version: 0.99.1 OS version: Microsoft Windows [Version 10.0.26100.4061]
Running a fork inside of nwjs seems to work unless certain dependencies are loaded into the fork at which point it exits with code 3221226505.
Reproduced here: https://github.com/jssuttles/nw-fork-issue
I checked with a colleague, and it doesn't break on Mac
When you change it to node inside of nwjs, it works again.
const child = require('node:child_process').fork(forkModule,[],{execPath: 'node'});
Spoke in Gitter. Recommeneded isolating the part of fs-extra that causes the issue so we can look into the root cause.
Hey @TheJaredWilcurt, I'm not sure if I found a root cause, but I've narrowed it down further by removing a lot of code from a package (I picked archiver). The readme describes how to get to a point that should work, but causes the issue. Running a require call at that point seems to break almost no matter what I do.
I can run something like require('is-buffer') at that point, but I can't run require('../stream') where 'stream.js' is replaced with just module.exports = {}.
That's still a large reproduction. can you make a minimal version that has the fewest lines of code and dependencies. Ideally no dependencies at all, tracking down whatever is in the dependency that is cause the issue.
Closing, re-open with more information.