Skip to content

[BUG] npm ls reports missing optional peer deps as missing deps #3137

Closed
@isaacs

Description

@isaacs

Current Behavior:

Missing optional peer deps are reported as problems, even though npm does not install them by default.

Expected Behavior:

Since these are all optional peer deps, they should not be reported as problems.

Steps To Reproduce:

In the cli project right now:

npm run resetdeps
npm prune
npm ls -a

Prints the following warnings:

npm ERR! code ELSPROBLEMS
npm ERR! missing: flow-remove-types@>=2.112.0, required by tap@15.0.4
npm ERR! missing: ts-node@>=8.5.2, required by tap@15.0.4
npm ERR! missing: typescript@>=3.7.2, required by tap@15.0.4
npm ERR! missing: bufferutil@^4.0.1, required by ws@7.4.5
npm ERR! missing: utf-8-validate@^5.0.2, required by ws@7.4.5

Environment:

npm 7.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions