[DOCS] `optionalDependencies` lacks example · Issue #9325 · npm/cli · GitHub
Skip to content

[DOCS] optionalDependencies lacks example #9325

Closed

Description

@fregante

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

There's no example, one has to read the entire description to understand the shape and usage (e.g. don't list the dependency in dependencies as well)

Potential Solution

A simple package.json example would remove any doubts about the usage

Docs URL

https://docs.npmjs.com/cli/v11/configuring-npm/package-json#optionaldependencies

Activity

  1. changed the title [-][DOCS] optionalDependencies' shape unknown, no examples, no description[/-] [+][DOCS] optionalDependencies' lacks example[/+] on May 8, 2026
  2. changed the title [-][DOCS] optionalDependencies' lacks example[/-] [+][DOCS] `optionalDependencies` lacks example[/+] on May 8, 2026
  3. added a commit that references this issue on May 15, 2026
    c97b39b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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