My app has a nodejs app started using fork() - the nodejs app is added to the build using the 'extraResource' option
When I run using 'npm start', it works fine, as does running the built exe in the 'out' folder
When I copy all the files into another directory, it complains "cannot find module 'winston'" for my child process
My main.js app uses winston and still works file - I can see a log file created with entries prior to the point it does the fork() and then the child process crashes with the above error
All the other npm packages are found ok
If I do 'npm install winston' in the new directory, then everything works, so all the other npm packages are found ok (like serialport, jsonfile, socket.io etc..)
Why the build exe appears to selectively omit 'winston' for the child process is beyond me
I'm guessing it's because it's a child process adding using 'extraResource' - but not a clue why or more importantly, how to fix it - anyone have any ideas?
Extract from my package.json..."dependencies": {"cbuslibrary": "^2.7.5","cookie-parser": "^1.4.6","electron-squirrel-startup": "^1.0.0","express": "^4.18.2","jade": "^1.11.0","jsonfile": "^6.1.0","morgan": "^1.10.0","openurl": "^1.1.1","serialport": "^12.0.0","socket.io": "^4.7.4","socket.io-client": "^4.7.4","winston": "^3.11.0"},"devDependencies": {"@electron-forge/cli": "^7.2.0","@electron-forge/maker-deb": "^7.2.0","@electron-forge/maker-rpm": "^7.2.0","@electron-forge/maker-squirrel": "^7.2.0","@electron-forge/maker-zip": "^7.2.0","@electron-forge/plugin-auto-unpack-natives": "^7.2.0","electron": "28.2.0"}