When upgrading an application to Angular 20 (which uses the new esbuild/Vite-based application builder and stricter TypeScript module resolution), importing the Node interface for the TreeView component causes a fatal build error.
Because tree-node.types.ts is not explicitly exported in the module's index.ts, modern Angular builders strictly block the import.
✘ [ERROR] TS2307: Cannot find module 'carbon-components-angular/treeview/tree-node.types' or its corresponding type declarations.
src/app/my-component.ts:3:21:
3 │ import { Node } from 'carbon-components-angular/treeview/tree-node.types';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In older Angular versions (Webpack), deep importing the physical file worked. However, strict package export rules now reject this.
When upgrading an application to Angular 20 (which uses the new esbuild/Vite-based application builder and stricter TypeScript module resolution), importing the Node interface for the TreeView component causes a fatal build error.
Because tree-node.types.ts is not explicitly exported in the module's index.ts, modern Angular builders strictly block the import.
In older Angular versions (Webpack), deep importing the physical file worked. However, strict package export rules now reject this.