Let's face it: monorepos are just huge monoliths. If you want modular software, you WILL have to pay the price of fragmentation. Someone needs to think about the boundaries between different parts of a system. If those boundaries are defined by functions, classes, packages or services, it doesn't matter that much. Yes, it is always a pain. Shipping the entire forest of modules in a single repo seems like a good compr…
Monorepos are a tooling nightmare. Monorepos are a bandwidth black hole.
Monorepos make some things possible that are just not possible or very very hard when you have multiple independent repos that are built and tested independently.
Namely,
a) they allow you to test the effects of a change on all the components that depend on you, before you merge your change. This reduces the noise caused by regressions (API or behaviour) introduced in one component that is depended on by many consumers.
b) they are a practical way to ensure that all components have up to date internal dependencies: by placing the burden of API and behaviour breakage to the author of the change, you don't end up having hundreds of teams each struggling to keep up with dependencies that keep breaking their builds when you update them and consequently hating the teams that release those changes.
None of these things is a big deal unless you're a huge company with hundreds of teams.
I think in theory there could be some tooling and workflow that could provide all or moat of the benefits of monorepos, without the downsides.
Until then, monorepos are likely going to be a bad choice for small companies.