Skip to content

fullTemplateTypeCheck: Cannot read property 'type' of null #1087

@dherges

Description

@dherges

Type of Issue

[x] Bug Report
[ ] Feature Request

Description

angular/angular#19906

angular/angular#24143

How To Reproduce

Issue happens when fullTemplateTypeCheck is enabled.

https://angular.io/guide/aot-compiler#fulltemplatetypecheck

Error: TypeError: Cannot read property 'type' of null
    at C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:25385:26
    at Array.forEach (native)
    at removeSummaryDuplicates (C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:25384:11)
    at TemplateParser.tryParseHtml (C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:24393:51)
    at TemplateParser.tryParse (C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:24370:21)
    at TemplateParser.parse (C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:24332:44)
    at AotCompiler._parseTemplate (C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:29710:60)
    at AotCompiler._compileComponent (C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:29682:23)
    at C:\projects\material2\node_modules\@angular\compiler\bundles\compiler.umd.js:29528:55
    at Array.forEach (native)

The issue can be work-around'ed by setting fullTemplateTypeCheck: false

Expected Behaviour

Something, just anything better :-)

An error message ... indicating where the problem in the code base.

Version Information

Angular CLI: 6.2.2
Node: 10.10.0
OS: linux x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.8.2
@angular-devkit/schematics        0.8.2
@angular/cdk                      6.4.7
@angular/cli                      6.2.2
@ngtools/json-schema              1.1.0
@ngtools/webpack                  6.0.8
@schematics/angular               0.6.1
@schematics/update                0.8.2
ng-packagr                        4.1.1
rxjs                              6.3.2
typescript                        2.9.2
webpack                           4.8.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions