nx: nx commands yield "process exited with code 1"
Current Behavior
nx commands are leaving open a cmd.exe window with [process exited with code 1] and some node_modules on Windows.
Expected Behavior
Nx commands, e.g. nx affected:build, should run and complete without leaving things open
Steps to Reproduce
mkdir nx-process-exited
npx create-nx-workspace@latest --preset empty code-1
cd .\code-1\
npm i @nrwl/js -D
nx g @nrwl/js:application show-result
nx affected:build
Failure Logs
a cmd.exe window with [process exited with code 1] is left open (maybe 2 of them)
also. I observe that these files are left open and are not deletable without a restart
C:\code-1\node_modules\@parcel\watcher\prebuilds\win32-x64\node.napi.glibc.nodeC:\code-1\node_modules\@nrwl\workspace\src\core\project-graph\daemon\client
I am not aware of any logs
Environment
Node : 14.17.5 OS : win32 x64 npm : 7.24.1
nx : 13.7.3 @nrwl/angular : undefined @nrwl/cli : 13.7.3 @nrwl/cypress : undefined @nrwl/detox : undefined @nrwl/devkit : 13.7.3 @nrwl/eslint-plugin-nx : 13.7.3 @nrwl/express : undefined @nrwl/jest : 13.7.3 @nrwl/js : 13.7.3 @nrwl/linter : 13.7.3 @nrwl/nest : undefined @nrwl/next : undefined @nrwl/node : undefined @nrwl/nx-cloud : 13.1.2 @nrwl/react : undefined @nrwl/react-native : undefined @nrwl/schematics : undefined @nrwl/storybook : undefined @nrwl/tao : 13.7.3 @nrwl/web : undefined @nrwl/workspace : 13.7.3 typescript : 4.5.5 rxjs : 6.5.5
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 12
- Comments: 20 (2 by maintainers)
Hello, I have a similar issue with a Nx NestJS/Angular application. When I run
nx serve api, a Windows Terminal opens with[process exited with code 1 (0x00000001)].I’m using:
Edit : The problem only seems to happen the first time I run the command after turning on my pc.
My impression is that this should be fixed in latest. With @FullDream confirming it, I’m going to close this out as we have addressed the root cause. If folks are still experiencing the problem, feel free to comment and it can be reopened.
And almost a year, and it became even worse - running prisma migrate spams now dozen of CMD flashing windows for almost a minute…
This should have been fixed with: https://github.com/nrwl/nx/pull/14965 Can you please retry with the
latestversion?I can confirm that disabling the daemon resolves the issue, but that is not ideal.
Hello, I also have a terminal that opens when I run an NX command on Windows 11. I have the impression that it’s the NX Deamon that launches.
I don’t have this anymore when I disable with
"useDaemonProcess": falseorNX_DAEMON falseas env var.Same thing happend in Windows Terminal - it spawn new window with “process exited with code 1” first time NX daemon in started. After OS restart or “nx clear-cache” - appears again.