nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23k stars 2.3k forks source link

Windows terminal output glitched since 17.3.x #21599

Open Sandwell opened 6 months ago

Sandwell commented 6 months ago

Current Behavior

1

When running nx commands on windows terminal, the cursor is set to the top of the terminal resulting in overlapping logs.

It was working fine on 17.2.8

Expected Behavior

Normal terminal cursor behavior on Windows

GitHub Repo

No response

Steps to Reproduce

  1. do this setup from https://nx.dev/getting-started/tutorials/angular-monorepo-tutorial npx create-nx-workspace@latest angular-monorepo --preset=angular-monorepo

  2. serve the app with nx serve angular-monorepo

Nx Report

$ npx nx report

 >  NX   Report complete - copy this into the issue template

   Node   : 18.17.0
   OS     : win32-x64
   yarn   : 1.22.19

   nx                 : 18.0.1
   @nx/js             : 18.0.1
   @nx/jest           : 18.0.1
   @nx/linter         : 18.0.1
   @nx/eslint         : 18.0.1
   @nx/workspace      : 18.0.1
   @nx/angular        : 18.0.1
   @nx/cypress        : 18.0.1
   @nx/devkit         : 18.0.1
   @nx/eslint-plugin  : 18.0.1
   @nrwl/tao          : 18.0.1
   @nx/web            : 18.0.1
   @nx/webpack        : 18.0.1
   typescript         : 5.3.3

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

No response

Sandwell commented 6 months ago

Probably fixed with that https://github.com/nrwl/nx/pull/21683

andregreeff commented 6 months ago

I recently updated a workspace from 16 to 17 and I've been experiencing the same issue.. using PowerShell 7.4.1 on Windows Terminal 1.18.

checking the linked PR, that seems to be tagged with 18.1.0-beta.0, but I cannot upgrade to Nx 18 yet because I use @nxext/capacitor and nxext/ionic-angular, which (currently) only support Nx 17.

any idea if that fix will be applied to 17 as well?

andregreeff commented 6 months ago

hmmm... so unless I'm missing something here, this appears to be more than just "glitchy console output"..

my workspace has multiple hybrid mobile applications, each of which have a dev target defined that wraps the run command from the @nxext/capacitor:cap executor.

one of the steps that Capacitor CLI performs in this process lists all currently available target devices for deploying the application binary that it builds. but when this list shows up up, pressing "up" or "down" simply does nothing, whereas pressing "enter" does indeed select the highlighted option, which defaults to the first item listed.

fortunately, possibly thanks to my AVD naming scheme, my currently running emulator is top of the list. so in this case I can simply press "enter" and carry on as normal. but if for any reason it's not the top-most option, then I'm screwed.

in the meantime, I'm going to try downgrade Nx to 17.2 and see if that helps.. if not, then I'm afraid my only option is to revert Git repo commits and get my project back to version 16.2.4 as it was previously. :( edit: downgrading to 17.2.8 works just fine, so I'll just stick to this version for now.

timtos commented 2 weeks ago

This bug is still available in 18.1.3, as it seems; was it fixed in 19+?