i don’t know how you fix this for js, but in general i think well designed and robust standard libraries are a great place to start.
the community shouldn’t need to write a bunch of tiny utility packages to do common things.
in other words, make it easier to avoid the deeply nested dependency mess that js encourages.