So I ran into a strange problem today. I was having some issues with one of my modules in IntelliJ so I decided I should try blowing it out and rebuilding it from a fresh checko
If you are using a maven structure, it could be that you ignore the poms after unloading modules. Check this at:
File | Settings | Build, Execution, Deployment | Build Tools | Maven | Ignored Files
Uncheck your modules and try again.
(If you have many files listed there, just deselect all via Ctrl + A, Space)