Skip to content

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

@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 [email protected]
npm ERR! missing: ts-node@>=8.5.2, required by [email protected]
npm ERR! missing: typescript@>=3.7.2, required by [email protected]
npm ERR! missing: bufferutil@^4.0.1, required by [email protected]
npm ERR! missing: utf-8-validate@^5.0.2, required by [email protected]

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