Problems with solar remain, however. It's neither practical nor safe to build 100% solar grid. You must overbuild capacity on solar, because weather happens. No energy is generated at night. Therefore you have to factory battery install cost as well. Finally there are black swan weather events that DO happen in nature that NO ONE can prevent:
https://en.m.wikipedia.org/wiki/Year_Without_a_Summer
Whereupon solar would be rendered useless precisely when humanity would need power the most.