[BUG] Peer dependency warnings are never seen when using legacy-peer-deps
Open
Nobody has claimed this yet.
Bug
Needs Discussion
Needs Triage
Release 9.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When using legacy peer deps, npm no longer throws a warning for uninstalled peer dependencies.

Notice no warning for eslint-config-airbnb's peers.
Expected Behavior
You should see a warning. Notice that yarn throws a warning:

Steps To Reproduce
- Go to codesandbox
- Create a new node project
- yarn add eslint-config-airbnb - note you get warnings
- rm -rf node_modules
- npm i eslint-config-airbnb --legacy-peer-deps=true - note you get no warnings
- Look in the package-lock.json and note that none of the peers have been installed
Environment
- npm: latest
- Node.js: LTS
- OS Name: N/A
- System Model Name: N/A
- npm config: N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by installing eslint-config-airbnb with npm i --legacy-peer-deps=true and compare the result with the reported Yarn warnings and package-lock.json. Trace npm's peer-dependency handling for legacy-peer-deps; the work is done when uninstalled peer dependencies produce a warning without being installed, with regression coverage for the reported steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100