question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fullTemplateTypeCheck: Cannot read property 'type' of null

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

11reactions
dhergescommented, Sep 24, 2018

I found one case where isSkipSelf of null relates to fullTemplateTypeCheck. Die to the error message I don’t know what piece of code causes the error. The error is supressed with fullTemplateTypeCheck: false

https://github.com/angular/angular/issues/20523

7reactions
Romanchukcommented, Jul 17, 2020

Issue appeared when i changed npm to pnpm since pnpm uses symlinks in node_modules

Angular 10 ng-packagr 10

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'type' of null - Stack Overflow
When I installed 8.2.3, as build would report error as Cannot read property 'type' of null ,. npm i @angular/cdk@8.0.0 and it resolved....
Read more >
Template type checking - Angular
In the most basic type-checking mode, with the fullTemplateTypeCheck flag set to false , Angular validates only top-level expressions in a template.
Read more >
Developers - fullTemplateTypeCheck: Cannot read property 'type' of ...
fullTemplateTypeCheck : Cannot read property 'type' of null.
Read more >
Angular compilation restrictions overview
when the flag is disabled, null and undefined types are ignored by the interpreter, ... Cannot read property 'length' of undefined ...
Read more >
Type-checking templates in Angular View Engine and Ivy
6. The {name: string;} type doesn't have property 'nane' declared. Another interesting case is here:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found