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

Skip to content

[DOCS] <title>npm help npx #7186

@jfines

Description

@jfines

Is there an existing issue for this?

  • I have searched the existing issues

This is a CLI Docs Enhancement, not another kind of Docs Enhancement.

  • This is a CLI Docs Enhancement.

Description of Problem

The npx docs appear to be inconsistent, possibly deprecated in places, and missing information?

I've been poking around looking at npx documention but it seem there are some command flags that are undocumented. I see them in actual use but not find them documented at https://www.npmjs.com/package/npx or https://docs.npmjs.com/cli/v8/commands/npx#description or the output of npm help npx on the command line. For example - here is the command the the nextjs course gives to initialize the project for the course: npx create-next-app@latest nextjs-dashboard --use-npm --example "https://github.com/vercel/next-learn/tree/main/dashboard/starter-example" I have not been able to find any documentation of the --use-npm or --example flags. Also not mentioned in any of the npx documentation (maybe I'm not seeing it and its there) is supplying a name nextjs-dashboard in the example command above. I know what they do and I have used the command given above for initializing the nextjs course project (showing that those undocumented flags are valid and do work) but I'm wondering where the real goods are on the npx command. The output of npm help npx even indicates that the some of the information found at the first link given here is deprecated and no longer a part of npx. @ryuku_ yes. I think what I'm bothered about is I think there may even more flags for npx that may be very useful; and, if so, I want to know what they are - but I don't know where I would get information about them if not the main sources of documentation. Is there a good, accurate, up to date source of info for the npx command that I don't know about?

Potential Solution

Update https://www.npmjs.com/package/npx and https://docs.npmjs.com/cli/v8/commands/npx#description and the output of npm help npx so that they are consistent with one another. Bring each of them up to date with the latest available command options and direct viewers to information about command options that are used with npx but may actually be a part of some other command (npm parhaps) - if that is what's going on.

To clarify - what I'm getting at in that last sentence is I don't know what the --use-npm and --example are associated with, whether there may be command flags from some other command being used with npx and that's why they aren't documented or that they are genuinely npx command flags and are undocumented. Intuitively, it seem to me, that there could easily be other command flags that work with or are a part of npx command that weren't mentioned here and there is nowhere to find out about them.

Docs URL

https://www.npmjs.com/package/npx, https://docs.npmjs.com/cli/v8/commands/npx#description

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentationdocumentation related issueNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions