npm / npm/cli

[FEATURE] npx should show execution path (in --verbose mode)

Open
#4,005 7 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cmd:exec Enhancement Priority 2 Release 8.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This issue exists in the latest npm version
  • I am using the latest npm
Current Behavior

When you type a but sometimes you bad type (press other key or don't remember exact command) and there is a command with the bad name npx <other command>. it is runs but you don't know how command runs.

For example:
npx tsc

But you type bad:

npx tsm

And maybe (in my case yes) you don't know what is tsm.

Expected Behavior

Maybe with --verbose npx could shows the execution path of binary or script called.

You type and the output could be something as:

$ npx --verbose tsc
[LOG] Level verbose
[LOG] Execute ./node_modules/typescript/bin/tsc
[LOG] Other useful things....
[LOG]....
Steps To Reproduce

No response

Environment

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by reproducing npx --verbose tsc and npx --verbose tsm, then trace how npx resolves and reports the command it executes. Done means verbose output identifies the execution path or binary used.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.