The following modules are missing or built with a different engine version

I fix this by:

  • add ModuleTest.h file like below

#pragma once
#include “CoreMinimal.h”

  • add ModuleTest.cpp file like below

#include “ModuleTest.h”
#include “Modules/ModuleManager.h”

IMPLEMENT_MODULE(FDefaultModuleImpl, ModuleTest);

  • add ModuleTest.Build.cs file like below

using UnrealBuildTool;

public class ModuleTest : ModuleRules
{
public ModuleTest(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

	PublicDependencyModuleNames.AddRange(
		new string[]
		{
			"Core"
			// ... add other public dependencies that you statically link with here ...
		}
		);


	//The path for the source files
	PrivateIncludePaths.AddRange(new string[] { "ModuleTest/Private" });			
	
}

}

  • then add ModuleTest to MyProject.uproject and MyProject.build.cs
  • then build solution
    then it works

I am ue 4.26.2 both work for Mac or windows