Replace legacy-peer-deps with targeted override#554
Merged
Conversation
3 tasks
Remove the blanket legacy-peer-deps setting from .npmrc. Instead, add a package.json override for babel-plugin-styled-components to accept the installed @babel/core version. This resolves the Babel 8 peer dep conflict without changing npm's resolution strategy for every other package, keeping the dependency tree lean (1804 vs 2100).
214cb35 to
eff95fa
Compare
Contributor
|
Can you add this to the override, and it should suppress the other 15 warnings. Example warning: add this to the override |
cigamit
approved these changes
Jun 29, 2026
cigamit
left a comment
Contributor
There was a problem hiding this comment.
I'll add the other overrides in my own PR.
Contributor
Author
ok! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
legacy-peer-deps = truefrom.npmrc, which was causing npm to pull in duplicate dependency trees (2100 packages, 1945 after dedup)overridesentry inpackage.jsonforbabel-plugin-styled-componentsto accept the installed@babel/coreversion, since the plugin works fine with Babel 8 via the jsx-compat wrapperpackage-lock.jsonwith strict peer dep resolution: 1800 packages (down from 2100)Context
PR #553 added
legacy-peer-depsto fix thenpm installfailure from the Babel 8 peer dep conflict. As cigamit noted, that flag changed npm's entire resolution strategy, inflating the dependency count by ~400 packages. This PR fixes the same peer dep conflict surgically, without the side effects.Test plan
rm -rf node_modules && npm installsucceeds without errorsnpm startcompiles without errorsnpm testpasses