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.

"let-" is only supported on ng-template elements.

See original GitHub issue

Bug description:

After Updating to the latest Angular Packages. I get a build error:

Compiling ng-bootstrap : module as esm5
Error: Error on worker #7: Error: Template parse errors:
"let-" is only supported on ng-template elements. ("</b></small>\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <template ngFor [ngForOf]=\"rows\" [ERROR ->]let-rowz=\"$implicit\" let-index=\"index\">\n      <tr *ngIf=\"!(datePicker.onlyCurrentMonth && rowz["): C:/Projekte/ /  /node_modules/ng-bootstrap/datepicker/daypicker.component.js@110:1658
"let-" is only supported on ng-template elements. ("h>\n    </tr>\n  </thead>\n  <tbody>\n    <template ngFor [ngForOf]=\"rows\" let-rowz=\"$implicit\" [ERROR ->]let-index=\"index\">\n      <tr *ngIf=\"!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6]"): C:/Projekte/ /  /node_modules/ng-bootstrap/datepicker/daypicker.component.js@110:1681
    at syntaxError (C:\Projekte\ \  \node_modules\@angular\compiler\bundles\compiler.umd.js:2724:21)
    at htmlAstToRender3Ast (C:\Projekte\ \  \node_modules\@angular\compiler\bundles\compiler.umd.js:15846:19)
    at Object.parseTemplate (C:\Projekte\ \  \node_modules\@angular\compiler\bundles\compiler.umd.js:18707:18)
    at ComponentDecoratorHandler._parseTemplate (C:\Projekte\ \  \node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\component.js:694:33)
    at ComponentDecoratorHandler._extractInlineTemplate (C:\Projekte\ \  \node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\component.js:671:33)
    at ComponentDecoratorHandler.analyze (C:\Projekte\ \  \node_modules\@angular\compiler-cli\src\ngtsc\annotations\src\component.js:204:37)
    at NgccTraitCompiler.TraitCompiler.analyzeTrait (C:\Projekte\ \  \node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:341:40)
    at analyze (C:\Projekte\ \  \node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:293:58)
    at _loop_1 (C:\Projekte\ \  \node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:315:21)
    at NgccTraitCompiler.TraitCompiler.analyzeClass (C:\Projekte\ \  \node_modules\@angular\compiler-cli\src\ngtsc\transform\src\compilation.js:321:35)
    at ClusterMaster.onWorkerMessage (C:\Projekte\ \  \node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:166:27)
    at C:\Projekte\ \  \node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:50:95
    at ClusterMaster.<anonymous> (C:\Projekte\ \  \node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:246:57)
    at step (C:\Projekte\ \  \node_modules\tslib\tslib.js:139:27)
    at Object.next (C:\Projekte\ \  \node_modules\tslib\tslib.js:120:57)
    at C:\Projekte\ \  \node_modules\tslib\tslib.js:113:75
    at new Promise (<anonymous>)
    at Object.__awaiter (C:\Projekte\ \  \node_modules\tslib\tslib.js:109:16)
    at EventEmitter.<anonymous> (C:\Projekte\ \  \node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:240:32)
    at EventEmitter.emit (events.js:321:20)

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: “@angular/core”: “~9.1.0”, ng-bootstrap: “@ng-bootstrap/ng-bootstrap”: “^6.0.2”, Bootstrap: “bootstrap”: “^4.4.1”,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
guillermolamcommented, May 1, 2020

Solved by removing an old dependency from package.json “ng-bootstrap”: “^1.6.3”,

...
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"bootstrap": "^4.4.1",
## "ng-bootstrap": "^1.6.3", ## Remove this
0reactions
rissomcommented, Jun 18, 2020

Solved it! Unfortunately I really have no idea what I did. But I think cleaning up angular.json and package.json helped. Also checking package versions with

npm outdated

and updating packages to their current version with

npm install <packagename>@latest.

Thanks for the help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"let-" is only supported on ng-template elements - Stack Overflow
I have encountered this error when upgraded from Angular 4.x.x to 5.x.x. Original code was: <template let-item> </template>.
Read more >
HTML : "let-" is only supported on ng-template elements
HTML : " let-" is only supported on ng - template elements [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] HTML :...
Read more >
DataGrid: ng-template not a known element, "let-" is only ...
Hello Oli, the problem is that in Angular2 it's named template instead of ng-template (this is Angular4). So your template should look like...
Read more >
Html – “let-” is only supported on ng-template elements
I am trying to get my frontend-application(Angular5.1.x) to run but it stops due to template parse error: "let-" is only supported on ng-template...
Read more >
ng-template - Angular
Angular's <ng-template> element defines a template that is not rendered by ... With <ng-template> , you can define template content that is only...
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