I view objects as a natural outcome of mutability, so in that sense they are a code smell. I've found that using const liberally (and keeping methods free of side effects) significantly reduces the number of variables in each object. Which means that I can make more of those const variables public, which tends towards better reusability/composability.
If that's the case then the build system or dependency management tool is too stupid. NPM is, for example, because you can't install most dependencies straight from git repositories. Most npm packages need to be built on the developers machine and only artefacts are uploaded to the npm registry. If you need to patch for example babel (which you depend on through five levels of intermediate dependencies), you're in for a hell.
Haskell, on the other hand, makes it very easy to fork & patch a dependency (even a transient one) and you can use that while upstream figures out how to merge a PR.
Why does this not not scale when doing enterprise java? Is it the 'enterprise', or 'java', or the combination thereof?
The functional programming and especially the data driven schools of thought tackle the same problem more elegantly.