Today I posted a problem I had with Mongoose 6.0.0 to Stack Overflow, and now (after a few hours) I managed to make my code work by changing the Mongoose version to 5.13.8. I still want to know why the code doesn't work on 6.0.0, but I think the "partial" solution I got may help somebody in the same situation I was in.
Should I answer my own question or edit the original question with the solution?