Bugfix: How to fix NX library build system to support all libraries ...

Documentation for Sessions

🐛 Bugfix: How to fix NX library build system to support all libraries ...

Date: 2026-01-25
Time: 15:24:41 UTC
Session: editor2-70.5
Agent: angular
Confidence: 100%
Status: ✅ Documented


📋 Decision Context

Question:

How to fix NX library build system to support all libraries including core utilities and data-access?

Task: Fix remaining NX build issues for gograb-space


🎯 Decision Made

Chosen:

  1. Update build script to inherit parent tsconfig compiler options (strict mode), 2. Fix incorrect export paths in library index files, 3. Convert all ng-packagr libraries to custom build script

Options Considered:

  1. Keep using ng-packagr
  2. Update build script to inherit parent tsconfig
  3. Fix export paths manually
  4. Use direct tsc compilation

💭 Reasoning

Three critical fixes were needed: 1) The custom build script wasn't inheriting parent tsconfig compiler options like 'strict: true', causing type inference issues in utilities library. Fixed by reading parent tsconfig and merging options. 2) The data-access library index.ts had incorrect relative paths (./lib/models instead of ./models). 3) Converted 17 remaining ng-packagr libraries to use the custom build script. The build script now properly handles TypeScript strict mode by reading both tsconfig.lib.json AND its parent tsconfig.json, merging compiler options correctly.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation