1

When ever I run nx serve on my windows terminal, after a while I see 100's of tabs open up with [process exited with code 1 (0x00000001)] error. They take all the focus away and I am not able to use my computer till the server is up and running.

Does anyone know why I see these tabs and how to prevent them?

Windows terminal with a lot of error tabs

Pratyush
  • 171
  • 1
  • 8

1 Answers1

1

You're seeing these tabs likely because you've got the Windows Terminal set as the default terminal. Windows Terminal defaults to only closing the tab/pane when a client application exits "gracefully", i.e. with an exit code of 0. The vintage console however would always close the window when the last client exits, regardless of exit code.

What you're seeing here is nx serve is spawning a bunch of child processes that are all exiting with 1, not 0. With the vintage console as the default terminal, these console windows would have all disappeared instantly. Now they all stick around as tabs in the Terminal.

You can get these tabs to disappear instantly by setting "closeOnExit": "always" in your profiles.defaults in the settings.

Ultimately though, nx should probably not be exiting with error code 1, unless there's actually a reason they're returning some sort of error (without otherwise logging any error)

zadjii
  • 529
  • 2
  • 4
  • Thank you! I have set the default terminal to Ubuntu for now to avoid this situation oof terminal capturing the focus while it opens 1000s of tabs. Since moving to Ubuntu I don't have these issues. – Pratyush Jul 06 '22 at 19:37