← npm Lockfile Duplicates Check
npm installs one copy of a package when every dependant accepts the same version. When two dependants need versions that cannot be the same, it nests a second copy under one of them. A large app can end up with dozens of these.
npm dedupe can often move one version up the tree and drop the other. Fix these first.overrides entry in package.json and testing.package-lock.json, once with devDependencies and once with --no-dev: only what you ship affects users.npm dedupe, then the check again. Same-major entries should shrink.overrides only when you can test the result; forcing a version a dependant was not built for can break it silently.node dupes-check.mjs --max-same-major 0 to CI so dedupable copies cannot creep back.A lockfile records versions, not sizes, so the count of extra copies is not a byte count. Some duplicates are harmless and some, such as two copies of a library with global state, matter a lot. The list is for review; it is not a finding that anything is broken.