Angular 22.1 production build regression: what it is and what to do

Angular 22.1 production build regression: what it is and what to do

Status: resolved upstream. Angular released the fix in @angular/build 22.1.2 on 30 July 2026. Upgrading resolves the issue, and the earlier recommendation to pin to 22.0.9 is no longer necessary.

Last updated: Jul 31, 2026

In short

Angular published @angular/build 22.1.0 on 29 July 2026. It contained a regression that made production builds fail when an application bundled pre-minified JavaScript. Every application using the SmartComponent Library NG packages on 22.1.0 or 22.1.1 was affected. Development builds were unaffected.

Angular released a fix in 22.1.2 on 30 July 2026, one day after the regression appeared.

Recommended action: upgrade @angular/build to 22.1.2 or later.

npm install --save-dev "@angular/build@^22.1.2"

How to recognise it

On an affected version, ng build --configuration=production fails with one or more errors of this form:

X [ERROR] The symbol "SYSTEM_FONT_INFO" has already been declared node_modules/pdfjs-dist/build/pdf.worker.min.mjs:32:11: 32 │ })();class SYSTEM_FONT_INFO{static strings=["css","loadedName","ba...

The symbol name and file vary. It may be accompanied by "<name>" is not declared in this file. The file named is always inside node_modules, never your own source.

ng serve and development builds were not affected, because the faulty optimizer only runs when optimization is enabled. This is why the problem typically appeared first in CI or in a release build, rather than during day to day development.

Affected versions

@angular/build

Affected

@angular/build

Affected

22.1.0 and 22.1.1

Yes

22.1.2 and later

No, contains the fix

22.2.0-next.0

Yes, this pre-release predates the fix

22.0.9 and all earlier 22.0.x

No

Angular 21 and earlier

No

Resolution

Upgrade @angular/build to 22.1.2 or later:

npm install --save-dev "@angular/build@^22.1.2"

Commit both package.json and package-lock.json, then confirm that a production build succeeds.

If you applied our earlier recommendation and pinned @angular/build to an exact 22.0.9, replace that pin with the range above so that you continue to receive Angular patch releases. Note that this is @angular/build and not @angular/cli: they are separate packages, and only the former carried the defect.

If you never pinned and your package.json already carries a range such as ^22.0.0, reinstalling is enough, since that range resolves to 22.1.2.

What caused it

Angular 22.1.0 replaced its production optimizer with a new implementation that edited bundles as text rather than as a parsed syntax tree. It inserted wrapper fragments at calculated character positions. In minified code two class declarations sit directly against one another with no whitespace between them, so the calculated positions collided, the fragments interleaved, and one class ended up outside the wrapper intended to contain it. The result was a duplicated declaration, which the bundler rejects.

Dependencies that ship non-minified code were unaffected, which is why most libraries did not trigger it.

Affected dependencies

Two dependencies fell within the scope of this defect, and both reached your application through the SmartComponent Library NG packages.

Dependency

How it reached your application

Dependency

How it reached your application

SmartComponent Library NG packages

Directly, as your own dependency. They were published as minified bundles, so they fell within the scope of the defect.

Kendo UI PDF Viewer (@progress/kendo-angular-pdfviewer)

Automatically. It is a required peer dependency of the SmartComponent Library NG packages, and a library component declares it as a template dependency, so it is retained in every consuming application. It brings a pre-minified pdfjs worker with it.

Because the Kendo PDF Viewer arrives through our packages rather than through your own code, every application built on the SmartComponent Library NG packages was affected on 22.1.0 and 22.1.1, whether or not it displayed PDFs.

We have since changed how the SmartComponent Library NG packages are published so that they no longer fall within the scope of this kind of defect (SCLNG-1734), and we reported the PDF Viewer exposure to Progress. With Angular's fix released, neither remains a barrier to building.

What we did

  • Identified the cause the morning after Angular's release, and mitigated our own build pipeline the same day.

  • Reported it to Angular with a minimal reproduction and a suggested fix: angular/angular-cli#33699. The Angular team confirmed the cause and opened a fix the same day, angular/angular-cli#33700, which was merged and released as @angular/build 22.1.2 on 30 July 2026.

  • Reported the PDF Viewer exposure to Progress: telerik/kendo-angular#4976.

  • Changed how the SmartComponent Library NG packages are published so that they are no longer affected (SCLNG-1734).

  • Verified 22.1.2 against our own production builds and against a standalone Angular application using the Kendo UI PDF Viewer.

What happens next

No further action is required beyond upgrading @angular/build. We are leaving the report to Progress open as a robustness improvement rather than an outstanding problem, and we will update this page if anything changes there.

Questions

Contact Consultingwerk support and reference this page. We are happy to review your configuration or to help you apply the upgrade.