Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Document name and version as optional for private packages #18781

@mjomble

Description

@mjomble

(This is a documentation change request)

I generally use npm for private projects. Even though I download public dependencies via npm, I have no intention of ever publishing most of my projects on npm, since they're too specific to be of use to others.

The documentation for package.json currently states that "The most important things in your package.json are the name and version fields. Those are actually required, and your package won't install without them".

This makes sense if I'm developing a package meant to be published and installed as a dependency on other projects.
However, on private projects, specifying the name and version values seems unnecessary. In fact, if I set "private": true and omit the name and version fields, nearly all tools work and show no warnings.

So, first, a question: are name and version officially considered to be required fields even for private projects?
And if not, could this exception be clarified in the documentation?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions