Trying to package, getting "unable to instantiate module 'UnrealEd' for non-editor targets"

I’ve read the other questions about this topic, and haven’t found a solution.

The error message from the build is:

Creating makefile for CMZUnreal (no existing makefile)
Total execution time: 1.03 seconds
Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.
(referenced via Target -> CMZEditor.Build.cs -> Blutility.Build.cs -> MainFrame.Build.cs -> Documentation.Build.cs)
Took 1.12s to run dotnet.exe, ExitCode=8

CMZEditor is my editor module. I’m not sure why it’s trying to use the editor module when I’m trying to use the platform launcher.

I’m not using any editor modules in my game module.

I have an editor module, but it’s marked as such in the uproject.

The .uproject modules section is:

"Modules": [
		{
			"Name": "CMZUnreal",
			"Type": "Runtime",
			"LoadingPhase": "Default",
			"AdditionalDependencies": [
				"Engine"
			]
		},
		{
			"Name": "CMZEditor",
			"Type": "Editor",
			"LoadingPhase": "Default"
		}
	],

The game module’s dependencies are:

		PublicDependencyModuleNames.AddRange(new string[]
		{
			"Core", 
			"CoreUObject", 
			"Engine", 
			"InputCore", 
			"EnhancedInput"
		});

		PrivateDependencyModuleNames.AddRange(new string[] { 			
			"GeometryCore",
			"GeometryFramework",
			"UMG", 
			"DeveloperSettings",
			"RenderCore"
		});

The editor module’s dependencies are:

        PublicDependencyModuleNames.AddRange(
            new string[]
            {
                "Core",
                "CoreUObject",
                "Engine",
                "InputCore",
                "Blutility"
            }
        );

        PrivateDependencyModuleNames.AddRange(
            new string[]
            {
                "UnrealEd",
                "EditorFramework",
                "AssetRegistry"
            }
        );

Hello @Tyrathect

Since you already checked the uproject file details and the dependencies in your module’s build.cs files the one thing I would check now is that your editor module is not being included as part of your game build in YourProjectName.Target.cs. That file should only have one entry of ExtraModuleNames.Add adding your game module and not the editor one.

Bingo! Great call. There is an entry in there. I’ll delete it and see what happens. If you don’t hear from me, it worked. Thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.