fullTemplateTypeCheck: Cannot read property 'type' of null
See original GitHub issueType 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:
- Created 5 years ago
- Reactions:2
- Comments:24 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found one case where
isSkipSelf of null
relates tofullTemplateTypeCheck
. Die to the error message I don’t know what piece of code causes the error. The error is supressed withfullTemplateTypeCheck: false
https://github.com/angular/angular/issues/20523
Issue appeared when i changed npm to pnpm since pnpm uses symlinks in node_modules
Angular 10 ng-packagr 10