Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MaxBlack-dev
Copy link
Contributor

Description

This PR adds clarification to the npx documentation about how arguments and options are handled when executing commands.

Changes

  • Added a clear explanation that arguments after the package name are passed directly to the executed command, not to npx
  • Included a practical example (npx create-react-app my-app --template typescript)
  • Directed users to consult package-specific documentation for available options

Fixes

Closes #7186

Context

Users were confused about where options like --use-npm and --example come from when running commands like npx create-next-app. As reported in issue #7186, the documentation didn't clearly explain that these options belong to the executed package (e.g., create-next-app), not to npx itself.

This clarification helps users understand:

  1. Arguments after the package name go to the executed command
  2. npx options must come before the package name
  3. Package-specific options should be looked up in that package's documentation

While the existing documentation did cover this concept in the "npx vs npm exec" section with technical details, it wasn't immediately clear for new users in the Description section where they start reading.

Type of Change

  • Documentation update

@MaxBlack-dev MaxBlack-dev requested a review from a team as a code owner November 30, 2025 01:42
@owlstronaut owlstronaut merged commit 090b6ca into npm:latest Dec 1, 2025
8 checks passed
@github-actions github-actions bot mentioned this pull request Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] <title>npm help npx

2 participants