# QUALITY_GATE_FAILED: Quality gate could not finish

> Quality gate could not finish

| Severity | Fault                         | Stage        |
| -------- | ----------------------------- | ------------ |
| error    | customer (the source package) | build output |

## What it means

A quality gate (the type check or the static security check) ran out of time or memory on this component, or stopped, so the build could not prove the component is safe to publish and refuses it. It usually means very large or deeply nested code, or types that the compiler expands without end.

## How to fix

Make the component smaller and simpler: split very large files, remove deeply nested expressions and recursive types; then publish again.
