Renamed user folder, now I can't build project

I have installed Xcode, then changed my user folder's name.

Now I get the following error, every time I try to build a project:


PCH was compiled with module cache path '/Users/lucas/Library/Developer/Xcode/DerivedData/ModuleCache/92O4X1R45I1O', but the path is currently '/Users/Lucas/Library/Developer/Xcode/DerivedData/ModuleCache/92O4X1R45I1O'.


I have tried looking for a setting to change paths, but I haven't been able to find it.

I have also tried uninstalling Xcode and installing it again, but that didn't help either....


Anyone who knows what I can do? There must be a way to change the path.

This worked for me (from https://guides.codepath.com/ios/Fixing-Xcode)

Delete the Module Cache


Within the same folder as your project's Derived Data is a Module Cache. When Code Completion stopped working, deleting this fixed it.

Close Xcode and delete the

~/Library/Developer/Xcode/DerivedData/ModuleCache
directory.
Renamed user folder, now I can't build project
 
 
Q