Unable to load module 'MyProject2' - 0 instances of that module name found

Hi,

I am getting this error after selecting “New C++ Class” and adding a blueprint function library.

This is the log with the error message:

CompilerResultsLog: Total time in Local executor: 2457.22 seconds
CompilerResultsLog: Total execution time: 2465.49 seconds
LogMainFrame: MainFrame: Module compiling took 2466.686 seconds
Reloading module MyProject2 after successful compile.
LogModuleManager: Warning: ModuleManager: Unable to load module 'MyProject2'  - 0 instances of that module name found.
Module couldn't be loaded.
LogSlate: Window 'Message' being destroyed
Message dialog closed, result: Yes, title: Message, text: Successfully added class 'MyBlueprintFunctionLibrary', however you must recompile the 'MyProject2' module before it will appear in the Content Browser. Failed to compile newly created game module.
Would you like to open the Output Log to see more details?
LogSlate: Window 'Add C++ Class' being destroyed

Any ideas what might be causing this, and any other information I can provide? This is in a fresh project.

I am getting this on UE5 as well. not sure what to try.