Generation of pages fails on Gitlab site

Hey there, turns out I had a similar issue (https://discourse.gohugo.io/t32202/) after updating Hugo a week ago without having made any changes to the local config/content/structure/template or else. To be specific, I had this issue again on my local machine.

After finding this post here, I have used option 1. It does the trick and properly shows all posts on the index page. However though, why does that issue happen again? Thank you.