Skip to content

npx fallback commands can hang on first run waiting for approval #739

@youbamj

Description

@youbamj

Summary

Plain npx fallback paths can block on first-run approval prompts when the underlying tool is not installed globally. In practice this can make RTK commands appear to hang or time out even though the underlying issue is an interactive npx confirmation.

Affected commands

  • rtk cc-economics via ccusage
  • rtk tsc
  • rtk next
  • rtk prisma
  • rtk npx prisma ...

Reproduction

  1. Use an environment where npx is available but the fallback tool is not installed globally.
  2. Run a command that falls back to plain npx <tool> ....
  3. Observe that the process may wait for first-run approval instead of returning normally.

Example cases:

rtk cc-economics
rtk tsc -- --version
rtk next -- --help
rtk prisma generate
rtk npx prisma --version

Actual behavior

RTK can appear to hang or time out because npx is waiting for interactive approval before installing/running the package.

Expected behavior

Install-capable npx fallback paths should run non-interactively so RTK either executes the tool or fails fast with a real error.

Impact

This is especially visible with ccusage, where first-run npx ccusage can make workflows such as cargo test --all appear to stall or time out.

Proposed fix

Use npx -y for install-capable fallback paths while leaving npx --no-install call sites unchanged.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions