Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] <title>npm help npx #7186

Open
2 tasks done
jfines opened this issue Jan 31, 2024 · 1 comment
Open
2 tasks done

[DOCS] <title>npm help npx #7186

jfines opened this issue Jan 31, 2024 · 1 comment
Labels
Documentation documentation related issue Needs Triage needs review for next steps

Comments

@jfines
Copy link

jfines commented Jan 31, 2024

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

@jfines jfines added Documentation documentation related issue Needs Triage needs review for next steps labels Jan 31, 2024
@ilyaigpetrov
Copy link

The documentation for npx 1 currently doesn't cover npx [options] <command>[@version] [command-arg]... which is present in the 4 years old docs at 2. @jfines, npx create-next-app@latest is npx <command[@version]> and the trailing arguments nextjs-dashboard --use-npm --example <long url> are passed to that command that's why they are not documented in the npm docs but documented at https://www.npmjs.com/package/create-next-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation documentation related issue Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

2 participants