Closed cskiwi closed 1 month ago
Hey @cskiwi thanks for the report! We're aware of this issue and are working on a fix :) It has to do with a misconfiguration in how Nx runs things. The default set by Node.js when running any commands on windows is to show a popup like this. So sometimes we miss instances and forget to disable this "feature". I'll let you know once we land something to fix it.
@MaxKless if I understand the problem correctly, it can be solved once and for all by implementing workspace-wide ESLint rule for Nx Monorepo that fails if exec
, spawn
, fork
etc are used without hideWindows
parameter
Everytime I come back to NX, this continues to be an issue. As someone that used to be a supporter of NX, it's very frustrating to be unable to use it outright. Given the severity of this issue, I would've expected an urgent fix, yet here we are months later still dealing with this on windows.
Yet another project I've had to pass NX usage on because of this exact cmd prompt popping issue.
Hey @CodeWithBryan I'm really sorry to hear about this. I tried reproducing on my windows machine and didn't see any popups on neither 19.1
nor latest
. Could you paste your nx report
and let me know what steps you're taking to see the popups? Like, what commands are you running, are you using them from just the nx
cli or Nx Console?
@cskiwi are you still running into this too on the latest versions?
I have the same issue, my colleague working on the same project as well. This is really annoying.
I get cmd consoles popping up from: nx\src\daemon\server\start.js
Here my nx report:
Node : 20.14.0 OS : win32-x64 bun : 1.1.6
Registered Plugins: @nx/webpack/plugin @nx/eslint/plugin @nx/jest/plugin
Hey thanks everyone for the reports! @cskiwi @nicolasebner
Thanks to the nx report
results I could track it down to the bun usage and have a fix in this PR https://github.com/nrwl/nx/pull/26718
@Den-dp you're right it might be time to find a solution to prevent this behaviour altogether. I'll talk about it with the team.
Should be released later this week :)
@MaxKless if I understand the problem correctly, it can be solved once and for all by implementing workspace-wide ESLint rule for Nx Monorepo that fails if
exec
,spawn
,fork
etc are used withouthideWindows
parameter
@MaxKless speaking of the workspace-wide ESLint rule... Not sure whether it is still relevant to you, but while trying to fix a similar issue in nx-dotnet/nx-dotnet#887, I came up with the following rule https://github.com/nx-dotnet/nx-dotnet/pull/887/commits/253663f2ad5d0a377ae830cade74cc19868eeb7e#diff-8f4b5073d52c957e7a4de5f5972eff8864a33308a60905f02cc5f80964e9fde8
Still happening with 19.7.3
...
no matter if I run serve, nx g app or just use IntelliJ with the Nx Plugin installed, I constantly see these windows popping up.
I had to disable the IntelliJ plugin because those windows stayed open and were frozen all the time
Yikes I'm sorry to hear that :/ I'll check it out today and see if I can repro it. Can you post your nx report
results. Since it doesn't happen for me, I assume it's some code in a specific plugin on windows.
guys, please prioritize this as much as it is possible for you. This really reduces productivity by a lot, on every file change in either of main IDEs you get n (3-10) popping out cmd windows (windows platform).
Node : 20.17.0 OS : win32-x64 Native Target : x86_64-windows npm : 10.8.1
Community plugins: @koliveira15/nx-sonarqube : 4.1.0 @storybook/angular : 8.2.9 angular-auth-oidc-client : 18.0.1
Will do! On it today :)
any update on the issue? this issue is literally unbearable.
I've seen these before but I'm really struggling to reproduce the issue on my windows machine. Could you provide a reproduction repo that I can clone and see the issue myself @absurdism2 @mklueh? It must be some specific combination of plugins or the like that's causing this. Usually these popups don't come from Nx Console but from the underlying nx version itself.
I'd love to fix this ASAP but it's hard if I don't see the error myself.
@MaxKless I can try that, but is it possible to get logs on what is opening the cmd with which arguments?
Maybe it's easier instead of building a reproducer project, and maybe it's something on my machine specifically.
You could try setting NX_VERBOSE_LOGGING=true
and run some commands like nx show projects
that calculate the project graph. Then you should also see the popups. Or is it only ever happening in Nx Console and never in the cli itself?
it does pop up whether you have nx-console installed or not (in my case Webstorm), "nx show projects" does trigger, popups, to check i uninstalled it. If i have nx console installed when it refreshes the workspace automatically it does trigger them too, it is not only when you save the file. Work like that is a torment.
@MaxKless I found one of the problematic places while going through @absurdism2's report:
@nx/vite : 19.6.4 https://github.com/nrwl/nx/blob/19.6.4/packages/vite/src/utils/executor-utils.ts#L34
hi, unfortunately i can not share my repo. What i could add is that i see these terminals being run for e.g. git config, npm evec vite, both as admin and normal user, mainly these are "npm exec vite", run couple of times. I did not have this issue before updating nx to latest version.
So I couldn't figure out exactly where the issue was in the nx repo but I do have a PR to prevent all these messages: https://github.com/nrwl/nx/pull/28073
Once it's released, let's make sure this is resolved!
but I do have a PR to prevent all these messages: nrwl/nx#28073
81 files - that's an impressive amount of work 👏 thanks!
when r u guys planning on releasing it ?
very soon, you should see a beta or canary release within the day. Proper release this week I think
Hey! We just cut a release 19.8.1
that contains this. Can you update and confirm that the issue is gone?
Hi. Problems still there, however i see this is happening only on latest webstorm only now.
your fixes however did move issue forward, previously on every file change (save) I had ton of these terminals, now they only appear when workspace is being refreshed via nx console (webstorm plugin). after uninstalling it all seems fine now, which is inline with what people report here too: https://github.com/nrwl/nx-console/issues/1751
That's nice! Are you on the latest nx console version for webstorm? I just released 1.32.1
which adds windowsHide
in a couple of places in Nx Console as well. So those notifications should be gone.... Can you confirm that it still happens with that version?
Current Behavior
Whenever I make a change in my project after updating to 19.1.0 a couple of terminals popup for a millisecond and then closing again. Making the whole experience very disturbing because it takes the focus. Making it very hard to work
Expected Behavior
No popups or at least not ones that take the active focus
Steps to Reproduce
Have a project using nx 19.1.0 on windows
Failure Logs / Images / Videos
This is the same as: https://github.com/nrwl/nx-console/issues/1751
Environment
nx report:
I know that angular is still on a prev version of nx because one package hasn't updated to the new angular material formatting giving an error. but I wouldn't think this would cause that issue