[BUG] npm 8.x allows incorrect peer dependencies with no warning nor error #5760
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Consider the following dependency structure:
Current behavior:
npm install
in "app" works without error.Expected Behavior
I expect an error because "react: ^17.0.2" is incompatible with
app
's "react@18.0.0" dependency.Steps To Reproduce
In this project:
npm-peer-deps-issue.tgz
With two packages
app
anddep1
and this directory structure:app
has thispackage.json
:dep1
has thispackage.json
:Run
npm install
fromapp
; notice that withnpm@9.x
we get an error (as expected) and withnpm@8.x
we do not get an error:Environment
The text was updated successfully, but these errors were encountered: