-
Notifications
You must be signed in to change notification settings - Fork 677
Open
Description
Bug
rtk npx dispatches to npm instead of npx, breaking all rtk npx invocations.
Reproduction
# npx works
$ npx cowsay hello
_______
< hello >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
# rtk npx doesn't — verbose confirms it runs npm instead of npx
$ rtk npx -v cowsay hello
Running: npm cowsay hello
npm error Missing script: "cowsay"
npm error
npm error To see a list of scripts, run:
npm error npm run
npm error A complete log of this run can be found in: ~/.npm/_logs/2026-03-25T11_53_23_189Z-debug-0.logExpected behavior
rtk npx <cmd> [args] should execute npx <cmd> [args], applying only output filtering.
Actual behavior
rtk npx executes npm instead of npx. Since npm is a different binary with different argument parsing, subcommands and their flags are misinterpreted.
Context
- rtk: 0.31.0
- npm/npx: 11.3.0
- Node: v24.0.0
- macOS (Apple Silicon)
The rewrite hook converts npx <cmd> [args] → rtk npx <cmd> [args], which then fails. rtk proxy npx <cmd> [args] works correctly as a workaround.
Related
- npx -p @scope/pkg binary fails: RTK treats scoped package name as npm subcommand #713 — scoped package parsing in
rtk npx(different root cause, same subsystem) - npx fallback commands can hang on first run waiting for approval #739 — npx fallback hang on first-run approval (different symptom)
- Handle supported commands through the bunx / bun x / pnpx / pnpm dlx / npx #197 — passthrough for tools invoked via npx/bunx/pnpx
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels