overrides doesn't work if hasShrinkwrap is true for a library that requires a library to be overridden #5141
Closed
2 tasks done
Labels
Bug
thing that needs fixing
config:overrides
Issues dealing with the overrides feature
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
overrides
doesn't work ifhasShrinkwrap
istrue
for a library that requires a library to be overridden.E.g.
@sap/logging
depends onmoment@2.29.2
and it alsohasShrinkwrap
. If I try to overridemoment
version to2.29.4
viaoverrides
, it doesn't work.Expected Behavior
The
moment
version is overriddenSteps To Reproduce
package.json
:npm i && npm ll moment
moment
version 2.29.2 (not 4 as requested to be overridden)As a wokaround, one can open
package-lock.json
, removehasShrinkwrap
from the@sap/logging
dependency and rerunnpm i
Environment
The text was updated successfully, but these errors were encountered: