npm downloads every dependency recursively. If a depends on d (= 1.2.3) and b depends on d (= 1.2.4), then both versions of d get downloaded into a and b’s respective node_modules.
All other package managers I’m aware of resolve dependencies into a flat list then download, and you can only have one version of the same package on your system.
npm
downloads every dependency recursively. Ifa
depends ond (= 1.2.3)
andb
depends ond (= 1.2.4)
, then both versions ofd
get downloaded intoa
andb
’s respectivenode_modules
.All other package managers I’m aware of resolve dependencies into a flat list then download, and you can only have one version of the same package on your system.