Unreal Build Tool Not Packaging: Unable to instantiate UnrealEd module for non-editor targets: Target -> *.Build.cs -> UMGEditor.Build.cs -> Sequencer.Build.cs

Unreal is having trouble packaging my game:


I can't figure this one out on my own, maybe someone here can help me out...
(Using UE5 on a regular Windows machine, C++ project with mostly Blueprint-C++ usage)

I have tried replacing possible c++ classes that may cause this with blueprints, but with no luck.

When I try package, the pop-up information says it packaged successfully, but the selected folder is empty and the following messages appear in the console:


UATHelper: Packaging (Windows):   ERROR: Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.
UATHelper: Packaging (Windows):          (referenced via Target -> *.Build.cs -> UMGEditor.Build.cs -> Sequencer.Build.cs)
PackagingResults: Error: Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.
UATHelper: Packaging (Windows): Took 1,3900914s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: Packaging (Windows): UnrealBuildTool failed. See log for more details. (C:\Users\*\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+(x86)+Epic+Games+UE_5.0EA\UBT-*-Win64-Shipping.txt)
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows): Updating environment variables set by a Turnkey sub-process
UATHelper: Packaging (Windows): The system can not find the path specified.
UATHelper: Packaging (Windows): The system can not find the path specified.


Here's the logged file after the error message:



Log.WriteLinePrivate: ERROR: Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.
Log.WriteLinePrivate:        (referenced via Target -> *.Build.cs -> UMGEditor.Build.cs -> Sequencer.Build.cs)
Log.WriteLinePrivate: BuildException: Unable to instantiate UnrealEd module for non-editor targets.
Log.WriteLinePrivate:    at UnrealEd..ctor(ReadOnlyTargetRules Target) in D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\UnrealEd.Build.cs:line 15Wrapped by TargetInvocationException: Exception has been thrown by the target of an invocation.
Log.WriteLinePrivate:    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
Log.WriteLinePrivate:    at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Log.WriteLinePrivate:    at UnrealBuildTool.RulesAssembly.CreateModuleRules(String ModuleName, ReadOnlyTargetRules Target, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 468Wrapped by BuildException: Unable to instantiate module 'UnrealEd': Unable to instantiate UnrealEd module for non-editor targets.
Log.WriteLinePrivate: (referenced via Target -> *.Build.cs -> UMGEditor.Build.cs -> Sequencer.Build.cs)
Log.WriteLinePrivate:    at UnrealBuildTool.RulesAssembly.CreateModuleRules(String ModuleName, ReadOnlyTargetRules Target, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 473
Log.WriteLinePrivate:    at UnrealBuildTool.RulesAssembly.CreateModuleRules(String ModuleName, ReadOnlyTargetRules Target, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 475
Log.WriteLinePrivate:    at UnrealBuildTool.RulesAssembly.CreateModuleRules(String ModuleName, ReadOnlyTargetRules Target, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs:line 475
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildTarget.CreateModuleRulesAndSetDefaults(String ModuleName, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 3801
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildTarget.FindOrCreateModuleByName(String ModuleName, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 3899
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildModule.RecursivelyCreateIncludePathModulesByName(List`1 ModuleNames, List`1& Modules, CreateModuleDelegate CreateModule, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModule.cs:line 964
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildModule.RecursivelyCreateIncludePathModulesByName(List`1 ModuleNames, List`1& Modules, CreateModuleDelegate CreateModule, String ReferenceChain) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModule.cs:line 966
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildModule.RecursivelyCreateModules(CreateModuleDelegate CreateModule, String ReferenceChain, List`1 ReferenceStack) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModule.cs:line 928
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildModule.RecursivelyCreateModulesByName(List`1 ModuleNames, List`1& Modules, CreateModuleDelegate CreateModule, String ReferenceChain, List`1 ReferenceStack) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModule.cs:line 950
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildModule.RecursivelyCreateModules(CreateModuleDelegate CreateModule, String ReferenceChain, List`1 ReferenceStack) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModule.cs:line 929
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildModule.RecursivelyCreateModulesByName(List`1 ModuleNames, List`1& Modules, CreateModuleDelegate CreateModule, String ReferenceChain, List`1 ReferenceStack) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModule.cs:line 950
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildModule.RecursivelyCreateModules(CreateModuleDelegate CreateModule, String ReferenceChain, List`1 ReferenceStack) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildModule.cs:line 931
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildBinary.CreateAllDependentModules(CreateModuleDelegate CreateModule) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildBinary.cs:line 159
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildTarget.PreBuildSetup() in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 2360
Log.WriteLinePrivate:    at UnrealBuildTool.UEBuildTarget.Create(TargetDescriptor Descriptor, Boolean bSkipRulesCompile, Boolean bUsePrecompiled) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 783
Log.WriteLinePrivate:    at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 684
Log.WriteLinePrivate:    at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, Boolean bSkipPreBuildTargets) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 258
Log.WriteLinePrivate:    at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 228
Log.WriteLinePrivate:    at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 565
Log.WriteLinePrivate: Timeline:
Log.WriteLinePrivate: 



It's a very basic game that shouldn't have any difficulties packaging at all.
Any Ideas?


Names have been replaced by a *

You may need to build out your solution in visual studio in the drop down select Editor and then open the editor and try to package again. Code 6 is something I find when a module or something critical is missing because the editor doesn’t recognize it because it’s not creating the build.cs and target.cs files automatically or in the correct directory.

Even when adding a new c++ class it puts the darn things in the wrong directory. I don’t know if this is a bug, but I always have to move things around to get them to package correctly. Code 6 can be from a boat load of reasons unfortunately usually something missing or in the wrong place.

Na, I tried both Rider (which I usually use) and VS, but both return code 6, unfortunately.

I’ve noticed something strange in the output tho:

1>Der Befehl ""C:\Program Files (x86)\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\GetDotnetPath.bat"" ist entweder falsch geschrieben oder
1>konnte nicht gefunden werden.

Meaning it couldn’t find the GetDotNet bat file. Could that be a reason why it won’t build?

Build started...
1>------ Build started: Project: KaijuGJ2022, Configuration: Development_Editor x64 ------
2>------ Skipped Build: Project: UE5, Configuration: BuiltWithUnrealBuildTool Win64 ------
2>Project not selected to build for this solution configuration 
1>Der Befehl ""C:\Program Files (x86)\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\GetDotnetPath.bat"" ist entweder falsch geschrieben oder
1>konnte nicht gefunden werden.
1>Win64 using Manual SDK 10.0.19041.0
1>Using 'git status' to determine working set for adaptive non-unity build (D:\Projekte\UnrealProjects\*).
1>Creating makefile for *Editor (no existing makefile)
1>UnrealBuildTool : error : Unhandled exception: System.ComponentModel.Win32Exception (5): Zugriff verweigert
1>                           at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
1>                           at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
1>                           at System.Diagnostics.Process.UpdateHasExited()
1>                           at System.Diagnostics.Process.get_HasExited()
1>                           at UnrealBuildTool.HotReload.ShouldDoHotReloadFromIDE(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDesc) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\HotReload.cs:line 343
1>                           at UnrealBuildTool.HotReload.GetDefaultMode(TargetDescriptor TargetDescriptor, BuildConfiguration BuildConfiguration) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\HotReload.cs:line 148
1>                           at UnrealBuildTool.HotReload.Setup(TargetDescriptor TargetDescriptor, TargetMakefile Makefile, List`1 Actions, BuildConfiguration BuildConfiguration) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\System\HotReload.cs:line 181
1>                           at UnrealBuildTool.BuildMode.Build(TargetMakefile[] Makefiles, List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, BuildOptions Options, FileReference WriteOutdatedActionsFile) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 310
1>                           at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 228
1>                           at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 565
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ""C:\Program Files (x86)\Epic Games\UE_5.0EA\Engine\Build\BatchFiles\Build.bat" *Editor Win64 Development -Project="D:\Projekte\UnrealProjects\*\*.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "*.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

Same goes for rider.

I am going to try to reinstall UE5 in a new directory, because I just found someone who had a similar problem (file not getting found) and apparently he just selected a file path with no spaces in the path, maybe that’ll fix it -_-.

And if that doesn’t work, imma try to install the required components for vs2019 aswell, instead of using the ones from vs2022, which hasn’t been a problem so far but might fix it aswell, who knows.

Well that did not work unfortunately

So, I managed to make Unreal Package the game finally. The solution was to remove “UMG” from the *.uproject file.

Unfortunately, the executable crashes at the start, so now I gotta resolve this error. I really hope it’s because of some small mistake I made in my c++ or blueprints…

Do you have the .NET framework installed? I had to go back and install that for whichever reason it didn’t install when I installed visual studio and that was an issue for me as well. I don’t recall exactly at this point I did, but I think I had to get it off the Microsoft website.

I know its kind of late and maybe there is more to it but I noticed that UnrealBuildTool recursively creates modules in this order: PublicDependencyModuleNames, PrivateDependencyModuleNames, and then DynamicallyLoadedModuleNames.

Therefore, if your Build.cs file has “UMG” in PublicDependencyModuleNames, but “Engine” is in PrivateDependencyModuleNames the build should fail, as UMG module is dependent on Engine module.

1 Like

I had the same problem. And I solved it by remove “UMGEditor” in *.uproject
hope it can be helpful. :slight_smile:

It works for me too, let me over explain a bit:
I opened the .uproject with SublimeText (or your editor of choice) and removed the “UMGEditor” from the list of plugins…

	"Plugins": [
		{
			"Name": "ModelingToolsEditorMode",
			"Enabled": true,
			"TargetAllowList": [
				"Editor"
			]
		}
	]

I do will like to know where the error comes from O_o …what does the plug-in does and why start buggin? …I guess there is another way to solved like making sure that the plug-in is actually in the source?