Fix: How to fix the 4 AI libraries build failures systematically?

Documentation for Sessions

📝 Fix: How to fix the 4 AI libraries build failures systematically?

Date: 2026-01-27
Time: 16:18:38 UTC
Session: editor2-71.7
Agent: angular
Confidence: 100%
Status: ✅ Documented


📋 Decision Context

Question:

How to fix the 4 AI libraries build failures systematically?

Task: Not specified


🎯 Decision Made

Chosen:

  1. Fix tsconfig.base.json lib/target mismatch (es2022). 2. Fix WidgetError to use native ES2022 Error.cause. 3. Move Angular deps to peerDependencies in package.json. 4. Switch problematic libs to custom builder. 5. Fix core-properties JSON imports to use namespace imports.

Options Considered:

  1. Keep fixing individual errors reactively
  2. Identify and fix root causes systematically

💭 Reasoning

Root cause analysis revealed: (1) lib=ES2020 vs target=ES2022 caused override flip-flopping, (2) package.json deps should be peerDeps for Angular libs, (3) ng-packagr has bugs with some files - custom builder works, (4) default imports of JSON need namespace imports for consistency. Fixed all 4 libraries by addressing root causes, not symptoms.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation