Skip to content
Latchkey

Angular "ngcc failed to process" View Engine library in CI

On Angular versions that ship ngcc, the compatibility compiler converts older View Engine libraries to Ivy during install or build. When it cannot process a package (incompatible format, partial install), it fails and blocks the build.

What this error means

A postinstall or build step fails with "Error: ngcc failed to process ..." naming a dependency it could not convert to Ivy.

ng
Compiling @some/legacy-lib : module as esm5
Error: ngcc failed to process /node_modules/@some/legacy-lib:
Failed to compile entry-point ... (es2015 as esm2015)

Common causes

A library incompatible with this Angular major

A View Engine library that ngcc cannot convert for the installed Angular version fails processing.

A partial or corrupted node_modules

An interrupted install leaves a package in a state ngcc cannot read, so conversion fails.

How to fix it

Reinstall cleanly and re-run ngcc

  1. Remove node_modules and reinstall from the lockfile.
  2. Let ngcc run again over a clean tree.
  3. If it still fails, the named library is incompatible.
Terminal
rm -rf node_modules
npm ci
npx ngcc

Upgrade or replace the incompatible library

Update the named dependency to an Ivy-compatible release for your Angular major, or remove it.

Terminal
npm install @some/legacy-lib@latest

How to prevent it

  • Keep dependencies on Ivy-compatible versions for your Angular major.
  • Cache node_modules keyed on the lockfile so ngcc output is reused.
  • Run a clean npm ci rather than incremental installs in CI.

Frequently asked questions

What causes ""ngcc failed to process""?
A View Engine library that ngcc cannot convert for the installed Angular version fails processing.
How do I fix "ngcc failed to process"?
Reinstall cleanly and re-run ngcc

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card