It started working for me when I emptied the default DerivedData folder and manually created ModuleCache.noindex folder. If any other folders are needed just creating it worked for me. This is a really annoying bug.