Repository navigation
[bug] Hide Windows consoles spawned by Nx task execution #37029
the-ult
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
01: Hide Windows consoles spawned by Nx task execution
Problem
When a multi-project Nx command runs on Windows, Nx can open many visible
node.execonsole windows. The number of windows follows the number of forked task processes. This is especially disruptive duringaffectedandrun-manycommands.The issue was observed with Nx
23.2.1, Node.js22or newer, and a forked task executor. The individual task can still finish successfully. The unwanted windows are a process-management problem in Nx, not a lint or test failure.Reproduction
23.2.1.nx affected -t test --parallel=4 --configuration=ci.The workspace currently uses a local package patch as a workaround. The unpatched Nx release still creates the windows.
Expected behavior
Nx should hide every Windows console created for a forked task process. Nx should still stream task output, pass messages over IPC, report task status, and clean up child processes as it does today.
Proposed fix
What to build: Nx task execution on Windows must run forked task processes without opening a visible console window for each task. Lint, test, and generation tasks must keep their current output, IPC, exit codes, and parallel behavior.
Pass Node's
windowsHide: trueoption to every forked child process used by the Nx task runner. Cover the batch worker, normal executor worker, direct-output worker, and pseudo-terminal bridge.Add regression coverage at the task-runner process-creation seam. The test should verify that each fork path requests hidden Windows consoles and that the existing task lifecycle still works.
Acceptance criteria
References
23.2.1release: https://github.com/nrwl/nx/releases/tag/23.2.1child_processAPI: https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-optionsspawn()options: https://nodejs.org/api/child_process.html#child_processspawncommand-args-optionsAll reactions