npm allows multiple versions of the same package - not ideal, but works. To do this in Java, you need multiple classloaders etc (basically what OSGi provides), but you are now in a different kind of hell.
edit : I forgot to add that Java modules may address this, but i am now out of the Java ecosystem for quite some time.
edit : I forgot to add that Java modules may address this, but i am now out of the Java ecosystem for quite some time.