这是indexloc提供的服务,不要输入任何密码
Skip to content

Keypress interaction with vite doesn't work ("o"+"Enter" doesn't open web) #9402

@shanike

Description

@shanike

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/shanike/turborepo-bug-repro

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Which canary version will you have in your reproduction?

2.2.4-canary.8

Describe the Bug

Vite's dev server is interactive. It accepts commands to perform operations like open the browser ("o") and restart the server ("r").

I know Turborepo v1 passes terminal input along to a dev server that was started through turbo dev. But, in Turborepo 2.2.3 it doesn't, which results with the following case:

The part that works: The "gui" opens and runs as expected, and when pressing "Enter" on the persistent vite job, it focuses into it and allows typing.
The part afterwards which doesn't work: Pressing the letter "o" followed by an "Enter" -> nothing happens.

Expected Behavior

After pressing the letter "o" followed by an "Enter" in a vite job -> vite opens the localhost web on the correct job's port. This does not happen with v2 of turbo.

To Reproduce

  1. Install Turborepo
  2. On 1 app install vite
  3. Create a "dev" vite+turbo task
    Now,
  4. pnpm exec turbo dev on apps/apps-a
    will run vite with turbo and won't open the web when pressing o + Enter

(But
5. pnpm dev
will open the web when writing o + Enter)

Additional context

On turbo v1.13.4 with experimentalUI turned on -> it DOES work: it opens the web when "interacting" with the vite task and pressing o + Enter.

This issue re-opens issue #8952.

Addressing comment #8952 (comment):

Thank you for your answer!
Unfortunately, we still encounter this strange behavior. The answers to your questions:

  • The other commands r + Enter, u + Enter, c + Enter, q + Enter and h + Enter work correctly
  • All the commands above do work as expected in loose mode, open command works as well
  • Yes, open http://localhost:5173/ in the terminal opens the web browser

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions