Skip to content

[DOCS] npm pack doesn't include file specified in main field #7799

@isti115

Description

@isti115

Is there an existing issue for this?

  • I have searched the existing issues

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

  • This is a CLI Docs Problem.

Description of Problem

The following section of the docs suggest that even with an empty files array, the path from main in package.json would still be included when running npm pack, but it doesn't behave accordingly for me:

Certain files are always included, regardless of settings:
* `package.json`
* `README`
* `LICENSE` / `LICENCE`
* The file in the "main" field
* The file(s) in the "bin" field

Potential Solution

If someone can confirm that this is indeed a discrepancy between the docs and the implementation, one should be adjusted to match the other.

Affected URL

No response

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 2secondary priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions