Skip to content
Latchkey

Unreal "Could not find ... Engine/Build" in CI

Unreal build scripts resolve the engine from a known root. When that path is wrong or the engine is not present on the runner, RunUAT or GenerateProjectFiles cannot find Engine/Build and stops immediately.

What this error means

A build script fails with "Could not find ... Engine/Build/BatchFiles" or "Unable to find Unreal Engine installation", before any compilation.

unreal
ERROR: Could not find a valid Unreal Engine installation.
Could not find "/home/runner/UE5/Engine/Build/BatchFiles/RunUAT.sh".

Diagnose it: which runtime is actually on PATH?

Runners ship multiple versions of most runtimes and select one through a version manager. When a setup action and a version file disagree, the resulting error is about your code rather than the version.

Terminal
which -a <runtime>
<runtime> --version
echo "PATH=$PATH" | tr ":" "\n" | head -20

# does a version file in the repo disagree with the workflow?
cat .tool-versions .nvmrc .ruby-version .python-version 2>/dev/null

Common causes

The engine is not installed on the runner

Unless the engine is checked out or restored, a runner has no Unreal installation, so the build scripts have nothing to point at.

A wrong or unset engine root

A misconfigured UE_ROOT/engine path, or a project built against an engine version not present, leads to the missing Engine/Build path.

How to fix it

Point the build at a real engine install

  1. Install or restore the Unreal Engine for the project version on the runner.
  2. Set the engine root environment variable to that install.
  3. Invoke RunUAT from inside the engine Engine/Build/BatchFiles directory.
Terminal
export UE_ROOT=/opt/UnrealEngine
"$UE_ROOT/Engine/Build/BatchFiles/RunUAT.sh" BuildCookRun \
  -project="$PWD/MyGame.uproject" -platform=Linux -build

Use a container with the engine baked in

A prebuilt Unreal CI image avoids installing the engine per run and fixes the engine paths.

How to prevent it

  • Install or restore the matching engine version before building.
  • Set the engine root explicitly in the job environment.
  • Use an engine image to keep paths consistent.

Frequently asked questions

What causes Unreal "Could not find ... Engine/Build" in CI?
There are 2 common causes: the engine is not installed on the runner and a wrong or unset engine root. Unless the engine is checked out or restored, a runner has no Unreal installation, so the build scripts have nothing to point at.
How do I fix Unreal "Could not find ... Engine/Build" in CI?
There are 2 fixes depending on which cause you have: point the build at a real engine install and use a container with the engine baked in. Work through them in order, since the first is the most common.
What does Unreal "Could not find ... Engine/Build" in CI actually mean?
A build script fails with "Could not find ...
How do I stop Unreal "Could not find ... Engine/Build" in CI happening again?
Install or restore the matching engine version before building. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card