My Electron app uses a nodejs dependency (in my case it's mysqljs) and it works fine when running on development mode.
However when I build it and launch as a native desktop app, it fails with:
Electron ERROR Error: Cannot find module 'mysql' Require stack: ...