Skip to content

[IVY][9.0.0] Renaming a directive in a consumed library built by ng-packagr causes error in Application when in watch mode #16920

@JonWallsten

Description

@JonWallsten

🐞 Bug report

Command (mark with an x)

  • build

Description

We are building a library with ng-packagr and then consuming it in our Angular 9 application.
When I renamed one of the exported directives used by the application I get an error causing rendering to skip the rest of the page.

image

image

🔬 Minimal Reproduction

As usual I can pr

ovide an example but it takes time. Let me know if it's needed.

🔥 Exception or Error


angular.js:31599 ERROR TypeError: Cannot read property 'ɵcmp' of undefined
    at getComponentDef (angular.js:29620)
    at extractDirectiveDef (angular.js:29446)
    at Array.map ()
    at def.directiveDefs (angular.js:29442)
    at createTView (angular.js:35363)
    at getOrCreateTComponentView (angular.js:35315)
    at addComponentLogic (angular.js:36046)
    at instantiateAllDirectives (angular.js:35890)
    at createDirectivesInstances (angular.js:35283)
    at ɵɵelementStart (angular.js:41965)

🌍 Your Environment


Angular CLI: 9.0.1
Node: 12.14.0
OS: win32 x64

Angular: 9.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.1
@angular-devkit/build-optimizer   0.900.1
@angular-devkit/core              9.0.1
@angular-devkit/schematics        9.0.1
@angular/cli                      9.0.1
@angular/http                     8.0.0-beta.10
@ngtools/webpack                  9.0.1
@schematics/angular               9.0.1
@schematics/update                0.900.1
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.5

Anything else relevant?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions