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

Terminal is unresponsive after running Vite #17933

Closed
bartlomieju opened this issue Feb 24, 2023 · 6 comments
Closed

Terminal is unresponsive after running Vite #17933

bartlomieju opened this issue Feb 24, 2023 · 6 comments
Labels
bug Something isn't working correctly node compat

Comments

@bartlomieju
Copy link
Member

running deno task dev in a vite project and stopping the devserver with ctrl-c the terminal does not accept keyboard input afterwards for me (manjaro linux, bash)

Reported on Discord by @dominikg

@bartlomieju bartlomieju added bug Something isn't working correctly node compat labels Feb 24, 2023
@Pronian
Copy link

Pronian commented Feb 24, 2023

I'm using Manjaro Linux with zsh and I can confirm this issue as well.

Steps to reproduce:

  1. run deno run npm:create-vite test and when prompted accept all permissions
  2. cd test && deno task dev
  3. Stop the process with Ctrl-C
  4. run deno run npm:create-vite test again, this time when prompted for permissions Ctrl-C will print in the console instead of stopping the process.

@rgripper
Copy link

I have the same issue in WSL2 Ubuntu 22 bash

@bartlomieju
Copy link
Member Author

I'm pretty sure this is the same problem as #16928

@bartlomieju
Copy link
Member Author

I found test cases in Node that check for this behavior:

  • test/pseudo-tty/test-set-raw-mode-reset.js
  • test/pseudo-tty/test-set-raw-mode-reset-signal.js
  • test/pseudo-tty/test-set-raw-mode-reset-process-exit.js
    We should match this behavior in both Node polyfills and Deno APIs.

@wryfi
Copy link

wryfi commented Oct 6, 2023

Any updates on this? #16928 seems to have been merged (and presumably released?) but I am experiencing this behavior with deno 1.37.1 on macOS 13.6, arm64, macports, bash 5.2.

Interestingly if I switch my shell from bash to zsh the shell will continue to echo after exiting the dev server, but the stty configuration has still subtly changed.

bash:

> deno run -A npm:create-vite-extra vite
✔ Select a template: › deno-svelte
✔ Select a variant: › TypeScript

Scaffolding project in /Users/wryfi/tmp/deno-test/vite...

Done. Now run:

  cd vite
  deno task dev

> cd vite
> stty
speed 38400 baud;
iutf8
-iexten
> deno task dev
> # `stty` again but nothing echoes
speed 38400 baud;
min = 1; time = 0;
-brkint -icrnl iutf8
-isig -icanon -iexten -echo

zsh:

> stty
speed 38400 baud;
iutf8
-iexten
> deno task dev
> stty
speed 38400 baud;
-brkint -icrnl iutf8
-isig -iexten

@bartlomieju
Copy link
Member Author

I believe this is now fixed thanks to #20892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

No branches or pull requests

4 participants