None of my projects package in 4.20

I keep getting this error when trying to create packaged projects in UE 4.20. I have absolutely no idea what “EditorWidgets.precompiled” is, but apparently it’s not there.

UATHelper: Packaging (Windows (64-bit)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (64-bit)): Running: C:\Program Files\Epic Games\UE_4.20\Engine\Binaries\DotNET\UnrealBuildTool.exe ECGame Win64 DebugGame -Project=E:\P4\JBaxter_Work\Eclipse\Eclipse_Steam\ECGame\ECGame.uproject  E:\P4\JBaxter_Work\Eclipse\Eclipse_Steam\ECGame\ECGame.uproject -NoUBTMakefiles  -remoteini="E:\P4\JBaxter_Work\Eclipse\Eclipse_Steam\
ECGame" -skipdeploy -noxge -generatemanifest -NoHotReload -log="C:\Users\James\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\UBT-ECGame-Win64-DebugGame.txt"
UATHelper: Packaging (Windows (64-bit)):   Using Visual Studio 2017 14.13.26128 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.13.26128) and Windows 10.0.16299.0 SDK (C:\Program Files (x86)\Windows Kits\10).
UATHelper: Packaging (Windows (64-bit)):   ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Epic Games\UE_4.20\Engine\Intermediate\Build\Win64\UE4\Development\EditorWidgets\EditorWidgets.precompiled'.
UATHelper: Packaging (Windows (64-bit)):             at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
UATHelper: Packaging (Windows (64-bit)):             at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
UATHelper: Packaging (Windows (64-bit)):             at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
UATHelper: Packaging (Windows (64-bit)):             at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
UATHelper: Packaging (Windows (64-bit)):             at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
UATHelper: Packaging (Windows (64-bit)):             at Tools.DotNETCommon.JsonObject.Read(FileReference File) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\JsonObject.cs:line 50
UATHelper: Packaging (Windows (64-bit)):             at UnrealBuildTool.PrecompiledManifest.Read(FileReference Location) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\PrecompiledManifest.cs:line 37
UATHelper: Packaging (Windows (64-bit)):             at UnrealBuildTool.UEBuildModuleCPP.Compile(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment BinaryCompileEnvironment, List`1 SharedPCHs, ISourceFileWorkingSet WorkingSet, ActionGraph ActionGraph) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configurat
ion\UEBuildModuleCPP.cs:line 425
UATHelper: Packaging (Windows (64-bit)):             at UnrealBuildTool.UEBuildBinary.SetupBinaryLinkEnvironment(ReadOnlyTargetRules Target, UEToolChain ToolChain, LinkEnvironment LinkEnvironment, CppCompileEnvironment CompileEnvironment, List`1 SharedPCHs, ISourceFileWorkingSet WorkingSet, ActionGraph ActionGraph) in D:\Build\++UE4\Sync\Saved\CsTools\Engine
\Source\Programs\UnrealBuildTool\Configuration\UEBuildBinary.cs:line 593
UATHelper: Packaging (Windows (64-bit)):             at UnrealBuildTool.UEBuildBinary.Build(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment CompileEnvironment, LinkEnvironment LinkEnvironment, List`1 SharedPCHs, ISourceFileWorkingSet WorkingSet, ActionGraph ActionGraph) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\Unre
alBuildTool\Configuration\UEBuildBinary.cs:line 196
UATHelper: Packaging (Windows (64-bit)):             at UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, CPPHeaders Headers, List`1 OutputItems, List`1 UObjectModules, ISourceFileWorkingSet WorkingSet, ActionGraph ActionGraph, EHotReload HotReload, Boolean bIsAssemblingBuild) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Progra
ms\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 2354
UATHelper: Packaging (Windows (64-bit)):             at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile, Boolean bCatchExceptions) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 1480
UATHelper: Packaging (Windows (64-bit)):          (see C:\Users\James\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\UBT-ECGame-Win64-DebugGame.txt for full exception trace)
UATHelper: Packaging (Windows (64-bit)): Took 20.3576467s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\James\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\UBT-ECGame-Win64-DebugGame.txt)
UATHelper: Packaging (Windows (64-bit)):        (see C:\Users\James\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\Log.txt for full exception trace)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Epic Games\UE_4.20\Engine\Intermediate\Build\Win64\UE4\Development\EditorWidgets\EditorWidgets.precompiled'.
PackagingResults: Error: UnrealBuildTool failed. See log for more details. (C:\Users\James\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\UBT-ECGame-Win64-DebugGame.txt)
PackagingResults: Error: Unknown Error

I’ve finally tracked this down. I have a plug-in called “Cascade Extentions” which essentially added a bunch of modules and suchlike to Cascade.

The problem is, I had “Cascade” as an entry in PublicDependencyModuleNames. As it turns out, Cascade is an editor-only module - and Particles and Particle Modules actually belong to the Engine_API, NOT the Cascade_API so Cascade wasn’t needed in non-editor builds. With IWYU, that module dependency was clearly dragging in other dependencies on editor modules and items.

Moving the ‘Cascade’ module into an editor-build check fixed the issue (see below). However - I’m leaving this one open because UBT provided me with absolutely no clue as to why this was failing. The issue only arose when I was forcing all my modules to the IWYU system.

This is what the corrected version looks like in 4.20. Note that in 4.18 and 4.19, I got completely different but equally impossible to track errors from UBT. I’d highly appreciate UBT logging to be improved in this area…

Good catch. I was following this question to see if you got a solution. As for which modules are editor only or not, with plugins you can find out from their .uplugin description. If they’re of type Development, you can’t use for shipping builds. For the engine modules that are not plugins, I suppose everything inside the Editor source folder is editor-only. So we should stick to the modules which source are in Runtime folder.

I’m struggling at the same problem, maybe this is the answer: (?)

Have the same problem too.
No idea when it happened as i like never packaged/built app for standalone …
But where does hte ‘EditorWidgets.precompiled’ comes from?!

Okay found it … I had an game module that imported something not designed to be in game (but in editor), so it imported editorwidgets … removed it, fixed it.

I also had a simular problem. Also getting a “EditorWidgets.precompiled” not found error.

I had to open the *.uproject file in visual studio (or any text editor of your choice) and remove UMGEditor under “AdditionalDependencies”.

very helpful even on 4.21, thank you for posting!

Helpful on 4.21

Where you using the binaries from the Epic Launcher or did you compile your own binaries?