Cannot read property 'hasInlines' of undefined
See original GitHub issue🐞 Bug report
Command (mark with an x
)
- new
- [ x] build
- serve
- test
- e2e
- generate
- add
- update
- lint
- xi18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present was: 8.2.2
Description
ng build --prod
is giving the following error after upgrade to 10.0.12. While ng serve
is working perfectly
🔥 Exception or Error
ERROR in TypeError: Cannot read property 'hasInlines' of undefined
at TemplateTypeCheckerImpl.getDiagnosticsForFile (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@angular\compiler-cli\src\ngtsc\typecheck\src\checker.js:123:28)
at NgCompiler.getTemplateDiagnostics (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@angular\compiler-cli\src\ngtsc\core\src\compiler.js:487:106)
at NgCompiler.getDiagnostics (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@angular\compiler-cli\src\ngtsc\core\src\compiler.js:141:97)
at NgtscProgram.getNgSemanticDiagnostics (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@angular\compiler-cli\src\ngtsc\program.js:152:45)
at checkDiagnostics (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@ngtools\webpack\src\diagnostics.js:47:27)
at Object.gatherDiagnostics (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@ngtools\webpack\src\diagnostics.js:86:13)
at AngularCompilerPlugin._emit (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:1081:54)
at AngularCompilerPlugin._update (E:\Dropbox\SmartTask\SmartTask.App\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:872:50)
at process._tickCallback (internal/process/next_tick.js:68:7)
🌍 Your Environment
Angular CLI: 10.0.7
Node: 10.16.1
OS: win32 x64
Angular: 10.0.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: <error>
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.1000.7
@angular-devkit/build-angular 0.1000.7
@angular-devkit/build-optimizer 0.1000.7
@angular-devkit/build-webpack 0.1000.7
@angular-devkit/core 10.0.7
@angular-devkit/schematics 10.0.7
@angular/cdk 10.1.3
@angular/cli 10.0.7
@angular/http 7.2.16
@angular/material 10.1.3
@ngtools/webpack 10.0.7
@nguniversal/common 10.0.2
@nguniversal/express-engine 10.0.2
@schematics/angular 10.0.7
@schematics/update 0.1000.7
rxjs 6.6.2
typescript 3.9.7
webpack 4.43.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Angular 9 - ERROR TypeError: Cannot read property 'name' of ...
I am trying to create a dynamic form-control, I want some controls to be disabled based on the condition, but I get Type...
Read more >Avoiding those dang cannot read property of undefined errors
Uncaught TypeError : Cannot read property 'foo' of undefined. The dreaded error we all hit at some point in JavaScript development.
Read more >Prevent “Cannot read property '…' of undefined” errors with ...
Every developer who did some JavaScript has got errors like “Cannot read property '…' of undefined”. There is one simple way to prevent...
Read more >ANGULAR 13 TypeError Cannot read property of undefined
In this tutorial, we will see a most common error faced by the Angular developers named as "TypeError Cannot read property of undefined...
Read more >ERROR TypeError: Cannot read property title of undefined
HEY, SET YOUR LIKE THERE ! ... Your browser can't play this video. ... Solved: ERROR TypeError: Cannot read property title of undefined....
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
There was a very weird issue. Took a full day to debug it.
I was able to identify a file. In it if I change an import’s filename (File A) Uppercase letter to Lowercase it works! although the imported file does start with a Uppercase letter.
I was further able to identify another file which refers to File A with Lowercase letter. Changing this reference to Uppercase solved the issue.
What @alan-agius4 said! 😄