Skip to content

bug(cdk): [ERROR] TS-993004: Unable to import directive in 19.2.4 #30663

@jeremyhofer

Description

@jeremyhofer

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

19.2.3

Description

Upgrading to 19.2.4 from 19.2.3 introduces compilation errors. On my local project the compilation issue is related to CdkFixedSizeVirtualScroll used by CDK overlay, but testing on stack blitz it appears to be an issue with many different directives.

Error message from my local project:

✘ [ERROR] TS-993004: Unable to import directive CdkFixedSizeVirtualScroll.
  The symbol is not exported from ./node_modules/@angular/cdk/overlay/index.d.ts
(module '@angular/cdk/overlay'). [plugin angular-compiler]

In a fresh stack blitz recreation w/ CDK 19.2.4 I am seeing the following:

✘ [ERROR] TS-993004: Unable to import directive CdkScrollable.
  The symbol is not exported from /home/projects/components-issue-starter-mzddipx4/node_modules/@angular/cdk/drag-drop/index.d.ts (module '@angular/cdk/drag-drop'). [plugin angular-compiler]

I suspect the issue was introduced via this commit/PR:

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-mzddipx4?file=package.json
Steps to reproduce:

  1. Simply open the example. The default project w/ latest 19.2.x dependencies fails to compile

Expected Behavior

No regressions should be present in a bugfix release.

Actual Behavior

A regression preventing application compilation has been introduced.

Environment

Angular CLI: 19.2.4
Node: 22.14.0
Package Manager: npm 10.9.2
OS: linux x64

Angular: 19.2.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package Version

@angular-devkit/architect 0.1902.4
@angular-devkit/build-angular 19.2.4
@angular-devkit/core 19.2.4
@angular-devkit/schematics 19.2.4
@angular/cdk 19.2.4
@angular/cli 19.2.4
@angular/material 19.2.4
@angular/ssr 19.2.4
@angular/youtube-player 19.2.4
@schematics/angular 19.2.4
rxjs 7.8.2
typescript 5.8.2

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: build & ciRelated the build and CI infrastructure of the projectin progressThis issue is currently in progress

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions