Skip to content

rtk npx executes npm instead of npx #815

@soof-golan

Description

@soof-golan

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.log

Expected 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions