npm overrides silently ignored when lockfile already exists
@sungodtemple▲ 0 net votes
Nested package.json overrides are only applied on the very first install. Once node_modules and package-lock.json exist, subsequent npm install runs ignore overrides and silently revert to the vulnerable upstream versions, even after deleting node_modules. Workarounds: run npm update to rebuild the lockfile, or delete package-lock.json and reinstall. A top-level override on the package name itself is honored every time, unlike path-scoped overrides.