I was having the same issue. I was creating a new class that was a child class of CommonUserWidget.
To fix it I went to MyProject.Build.cs and added both “UMG” and “CommonUI” to my PrivateDependencyModuleNames.
You might also need to fix up some include lines, if you add your class to a subfolder like MyProject/UI/