I’ve rebuilt 3 sites today, and each one tripped up as above at the same time, which seemed to be just after updating the Theme Components.
Each time a 2nd rebuild ran just fine, with me changing nothing at all. I do wonder if Maxmind is a bit of a red herring (or simply a different issue).
I use a 2 container setup so a failed rebuild is no big deal.