# Cooking fails from command line, succeeds in editor

**URL:** <https://forums.unrealengine.com/t/cooking-fails-from-command-line-succeeds-in-editor/444214>\
**Category:** Platform & Builds\
**Tags:** command-line-argumen, unreal-engine, question, Cooking-Failed\
**Created:** [February 27, 2019, 2:13pm UTC](https://forums.unrealengine.com/t/cooking-fails-from-command-line-succeeds-in-editor/444214 "2019-02-27T14:13:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c4b4b7d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c4b4b7d](https://forums.unrealengine.com/u/anonymous_user_1c4b4b7d)\
**Post date:** [February 27, 2019, 2:13pm UTC](https://forums.unrealengine.com/t/cooking-fails-from-command-line-succeeds-in-editor/444214/1 "2019-02-27T14:13:18Z")

</div>

I’m invoking the cook in powershell with `.\UE4Editor-Cmd.exe PROJ -run=cook -targetplatform=Windows`

It’s failing with the following error:

```
Error: Fatal error: [File:C:\wkspc\main\UE4\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerSave.cpp] [Line: 240]
Error: Attempt to map an object during save that was not listed as a dependency. Saving Export 824 K2Node_CallFunction_1688 in /Game/PROJ/UI/prototyping/HUD/Blueprints/HUD_PROJ. Missing Dep on Import /Script/Engine.

```

There are no related data validation errors, and the cook succeeds within the editor if I run it there, the error only appears when using the command line.

What is going on here?

---

<div class="post-metadata">

**Author:** ![where44444](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@where44444](https://forums.unrealengine.com/u/where44444)\
**Post date:** [June 13, 2023, 4:25pm UTC](https://forums.unrealengine.com/t/cooking-fails-from-command-line-succeeds-in-editor/444214/2 "2023-06-13T16:25:25Z")

</div>

I’m having this problem too when pressing “Launch” in the editor with a C++ Project, 4.27.2
