This can be fixed in npm if you publish pre-compiled binaries but that has its own problems.
Same goes for rust. Sometime one package implicitly imports other in different version. And look of rustup tree to resolve the issue just doesn't seem very appealing.