Using PM2 on Windows, node console pops up every time an n8n node/workflow runs

Hello.
We’re trying to deploy our first workflow. We’re using PM2 on Windows. The workflow works fine, except that a node console pops up every time the workflow runs (which is frequent, and subsequently quite problematic). Actually, it’ eveytime an n8n node runs, in dev mode, any time I click to run a node in a workflow, the node console pops up.
I’ve seen that the issue has been mentioned and discussed extensively in Github/SO, with wildly varying results depending on the applications running in PM2. There seems to be some people using PM2 and Windows here, so I figured they have inevitably encountered this, and hopefully have the solution how to avoid these incessant pop ups (pictured below)!

Hey @diskin, I use docker myself instead of PM2, but I suspect this might be because n8n starts each workflow execution in its own process when running in the default process execution mode (own).

You could try switching to the main execution mode to verify whether this alleviates the behavior. The respective documentation can be found here.

Thanks for taking a look at it, and your reply!
I switched to main execution mode from own. The result is that the console window just flashes now, each time the node is run. I didn’t realize it at first, but in fact, your suggestion actually fully fixes the primary issue. The flashing console window that flashes now, is exclusive to running the Execute Command node. And it seems that it’s a not a Node console window, just a regular CMD terminal window.

When using n8n on desktop, the issue doesn’t appear. Running n8n with PM2, however, I’m seeing the issue – again just to clarify, solely related to the Execute Command node.

From what I’ve gleaned looking around GH/SO, it could likely be fixed by putting
windowsHide: true where the child_process for the node is being called, presumably in the ExecuteCommand.node.js file? The js code is beyond my skillset and comprehension - any chance you could tell me where?