📝It is preferable to have a single version of each library
When resolving dependencies, it is preferable to have a single version of each library.
Pros
decreased bundle size
libraries can interoperate
Cons
requires dependency resolution and proper version annotations / version compatibility information, which is hard to do properly
sometimes, a single version cannot satisfy all constraints
Examples
npm does a good job trying to satisfy all constraints, but if it cannot, it installs multiple versions of a package (scoped to the dependent). This might lead to incompatibility issues, but sometimes it works fine. (It helps that js is dynamically typed.)