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

**URL:** <https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049>\
**Category:** Platform & Builds\
**Tags:** package, unreal-engine, unrealbuildtool, UE5-0, package-error\
**Created:** [February 6, 2022, 9:16pm UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049 "2022-02-06T21:16:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vlajd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlajd/32/88713_2.png) [@Vlajd](https://forums.unrealengine.com/u/Vlajd)\
**Post date:** [February 6, 2022, 9:16pm UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/1 "2022-02-06T21:16:42Z")

</div>

# 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:
  

```auto
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:
  
  

```auto
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 \*

---

<div class="post-metadata">

**Author:** ![Humanasset](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/humanasset/32/251551_2.png) [@Humanasset](https://forums.unrealengine.com/u/Humanasset)\
**Post date:** [February 7, 2022, 2:13am UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/2 "2022-02-07T02:13:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Vlajd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlajd/32/88713_2.png) [@Vlajd](https://forums.unrealengine.com/u/Vlajd)\
**Post date:** [February 7, 2022, 10:43am UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/3 "2022-02-07T10:43:43Z")

</div>

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:

```auto
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?

```auto
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.

---

<div class="post-metadata">

**Author:** ![Vlajd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlajd/32/88713_2.png) [@Vlajd](https://forums.unrealengine.com/u/Vlajd)\
**Post date:** [February 7, 2022, 4:48pm UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/4 "2022-02-07T16:48:53Z")

</div>

Well that did not work unfortunately

---

<div class="post-metadata">

**Author:** ![Vlajd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vlajd/32/88713_2.png) [@Vlajd](https://forums.unrealengine.com/u/Vlajd)\
**Post date:** [February 7, 2022, 5:51pm UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/5 "2022-02-07T17:51:13Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Humanasset](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/humanasset/32/251551_2.png) [@Humanasset](https://forums.unrealengine.com/u/Humanasset)\
**Post date:** [February 8, 2022, 12:53am UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/6 "2022-02-08T00:53:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![VPK\_BG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VPK\_BG](https://forums.unrealengine.com/u/VPK_BG)\
**Post date:** [August 24, 2022, 11:56am UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/7 "2022-08-24T11:56:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![baldsun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@baldsun](https://forums.unrealengine.com/u/baldsun)\
**Post date:** [September 24, 2022, 1:03pm UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/8 "2022-09-24T13:03:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DrKiller](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/drkiller/32/760780_2.png) [@DrKiller](https://forums.unrealengine.com/u/DrKiller)\
**Post date:** [May 5, 2024, 3:15am UTC](https://forums.unrealengine.com/t/unreal-build-tool-not-packaging-unable-to-instantiate-unrealed-module-for-non-editor-targets-target-build-cs-umgeditor-build-cs-sequencer-build-cs/495049/9 "2024-05-05T03:15:10Z")

</div>

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…

```auto
	"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?
