Skip to content

[DOCS] Every page of npm help <x> should display the local npm version #7110

Closed
@DanKaplanSES

Description

@DanKaplanSES

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

For context, I'm trying to figure out how to pass an argument to node.exe in a npx command. While researching, the CLI told me to type npm help exec to see more information. This open and a local file in my browser: file:///C:/Program%20Files/nodejs/node_modules/npm/docs/output/commands/npx.html

This file doesn't say which version of npm I'm using anywhere that I can find. As a result, I have no frame of reference compared to the docs I find while googling. I can't tell if I'm reading the latest npm cli docs or if I'm a version behind/ahead of the latest official documentation. It's unlikely I'll notice differences between the online and local articles, but those differences could be critical: they could indicate my current experience would be fixed by upgrading my npm version. It makes it easier to see when a new version of npm exists, and that would probably reduce issues created in this repository, among other benefits.

Potential Solution

Every page of local documentation should say the local version of NPM.

Workaround: this can be cross checked by typing npm -v on the local CLI.

Docs URL

https://docs.npmjs.com/cli/v10/commands/npx

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