Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nx cli crashes randomly on all commands #22650

Closed
1 of 4 tasks
emanual4real opened this issue Apr 3, 2024 · 5 comments
Closed
1 of 4 tasks

Nx cli crashes randomly on all commands #22650

emanual4real opened this issue Apr 3, 2024 · 5 comments

Comments

@emanual4real
Copy link

Current Behavior

Lint, build, test, serve, all these commands will randomly crash when you try to run them. The terminal will freeze with some random characters. If you close the terminal, the process is still running taking up 5% CPU.

Expected Behavior

Lint, build, test, server commands will run the first time and will properly close when exited.

GitHub Repo

No response

Steps to Reproduce

Internal company repo, cannot share.

Nx Report

NX   Report complete - copy this into the issue template
@nx/eslint-plugin  : 18.1.2
@nx/storybook      : 18.1.2
@nrwl/tao          : 18.1.2
@nx/web            : 18.1.2
@nx/webpack        : 18.1.2
typescript         : 5.3.3
---------------------------------------
Community plugins:
@ngrx/effects        : 17.0.1
@ngrx/router-store   : 17.0.1
@ngrx/schematics     : 17.0.1
@ngrx/store          : 17.0.1
@ngrx/store-devtools : 17.0.1
@storybook/angular   : 8.0.0
ngx-bootstrap        : 12.0.0

Failure Logs

PS C:\Users\exh11\workspace\GroupPlanManagement\apps\ui> npm run bta:serve

> ui@0.0.0 bta:serve
> nx serve bta      


> nx run bta:serve:local

^[[9;1R

Package Manager Version

NPM 8.19.3

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Node v18.13.0

This issue started happening only after our recent upgrade. We upgraded from Angular 15 to Angular 17 as well as upgrading our nx version. I thought it might be related to extensions, so I opened VS Code with all extensions disabled but the issue would still occur.

I just figured out that if you press "enter" when it freezes, it will continue the process and you can cancel it.

@fischeversenker
Copy link

fischeversenker commented Apr 4, 2024

Slightly different versions, same random behaviour:

Nx report:

Node   : 20.12.1
OS     : win32-x64
npm    : 10.5.0

nx                 : 18.2.2
@nx/js             : 18.2.2
@nx/jest           : 18.2.2
@nx/linter         : 18.2.2
@nx/eslint         : 18.2.2
@nx/workspace      : 18.2.2
@nx/angular        : 18.2.2
@nx/cypress        : 18.2.2
@nx/devkit         : 18.2.2
@nx/eslint-plugin  : 18.2.2
@nx/node           : 18.2.2
@nx/plugin         : 18.2.2
@nrwl/tao          : 18.2.2
@nx/web            : 18.2.2
@nx/webpack        : 18.2.2
typescript         : 5.4.3
---------------------------------------
Community plugins:
@some/proprietary-plugin : 17.4.0
@some/proprietary-plugin : 39.1.1
@aposin/ng-aquila        : 17.4.0
@compodoc/compodoc       : 1.1.19
@testing-library/angular : 15.2.0
---------------------------------------
Local workspace plugins:
         @some/proprietary-plugin

Additional notes:

  • I noticed that I only get the ANSI escape sequence (e.g. ^[[7;1R, ^[[9;1R) in VSCode's integrated terminal. Outside of VSCode, the process freezes without that sequence.
  • Looking at the shell snippets in the issue description, OP reported this with PowerShell. I can reproduce this also with Git bash.
  • This is hard to reproduce because it's so random, but I'm fairly confident it doesn't happen on Linux (WSL Ubuntu).

@JulianMa
Copy link

JulianMa commented Apr 4, 2024

Edit: After a few hours the issue returned, so its unlikely that this was the cause.. :(

I had the same Issue and this might fix it for you:
Have you, by any chance, changed your default Terminal in your windows developer settings?

I changed it some time ago from the now default (win-11) Windows-Terminal to the legacy Windows-ConsoleHost, because i ran into Issues with colors in another unrelated application.

When i changed it back to the now default Windows-Terminal, the ANSI issues disapeared.
Just go to: Privacy & Security > For developers and select Windows Terminal:
image

Still, this should not happend at all. Maybe there should be a warning, when using the legacy console host?

@alljinx
Copy link

alljinx commented Apr 5, 2024

Same here, with "^[[55;1R".

OS     : win32-x64
npm    : 10.5.0

nx                 : 18.2.2
@nx/js             : 18.2.2
@nx/jest           : 18.2.2
@nx/linter         : 18.2.2
@nx/eslint         : 18.2.2
@nx/workspace      : 18.2.2
@nx/angular        : 18.2.2
@nx/cypress        : 18.2.2
@nx/devkit         : 18.2.2
@nx/esbuild        : 18.2.2
@nx/eslint-plugin  : 18.2.2
@nx/express        : 18.2.2
@nx/node           : 18.2.2
@nx/plugin         : 18.2.2
@nrwl/tao          : 18.2.2
@nx/web            : 18.2.2
@nx/webpack        : 18.2.2
typescript         : 5.4.3
---------------------------------------
Community plugins:
@compodoc/compodoc : 1.1.23
angular-calendar   : 0.31.0
ng-mocks           : 14.12.1
---------------------------------------
Local workspace plugins:
         @jdm/plg-node-packager
         @jdm/plg-elc```

@FrozenPandaz
Copy link
Collaborator

This is a duplicate of #22358. We are investigating the issue. Please follow there for updates.

@FrozenPandaz FrozenPandaz closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
Copy link

github-actions bot commented May 6, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants