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.

TypeError by using locale Angular-Template

See original GitHub issue

I have followed tutorila in medium.com about create lib-componente in angular (tutorial). In short I did:

1 - Create lib-project with comand:

ng generate library mv-logo 2 - Build library

ng build --configuration production 3 - Create link

I am sure that link was created, because I check the list of all with command

npm list -g

usr/local/lib
├── mv-logo@0.0.6 -> ./../../../Users/vondramk/Documents/angular/lib-workspace/dist/mv-logo

If I start this template in my app it is showed immer the same error code.

main.ts:12 TypeError: Cannot read property 'bindingStartIndex' of null
  at Module.ɵɵelementStart (core:14847)
  at MvLogoComponent_Template (mv-logo.component.ts:6)
  at executeTemplate (core.js:9598)
  at renderView (core.js:9402)
  at renderComponent (core.js:10682)
  at renderChildComponents (core.js:9267)
  at renderView (core.js:9427)
  at renderComponent (core.js:10682)
  at renderChildComponents (core.js:9267)
  at renderView (core.js:9427)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
JoostKcommented, Sep 13, 2021

This is a duplicate of #35586. When linking a library, it’s typical for another copy of @angular/core to become included in the bundle which prevents sharing the runtime state, causing errors like these. This can typically be resolved using "preserveSymlinks": true in the Angular builder (see here for details).

2reactions
petebacondarwincommented, Sep 10, 2021

I’ll take a look next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing locale data for the locale "XXX" with angular
I had the same issue with this error message: Missing locale data for the locale "hu".' for pipe 'DatePipe'. This solved. Thanks! –...
Read more >
Template type checking
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 >
Angular component in locale usage | by Marek Vondra
This project was generated with Angular CLI version 12.1.3. ... ERROR TypeError: Cannot read properties of null (reading 'bindingStartIndex').
Read more >
Date.prototype.toLocaleDateString() - JavaScript | MDN
Using locales. This example shows some of the variations in localized date formats. In order to get the format of the language used...
Read more >
How to Avoid the Infamous "Cannot read properties of ...
With TypeScript, there are two ways of interpreting null and undefined ... avoid the 'Cannot read properties of undefined' runtime TypeError.
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