Skip to content

[Bug]: Missing export for Node and EventOnNode in TreeView public API breaks Angular 17+ esbuild #3519

Description

@nizamial09

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions