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.

Building with AoT throws errors

See original GitHub issue

Using latest version for compiler and mdl

 ngc -p ./tsconfig-aot.json

Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-dialog.component.ngfactory.ts:153:18: Property 'template' is private and only accessible within class 'MdlDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:261:46: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:261:104: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:266:59: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:266:117: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:269:46: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:269:104: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:274:43: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:274:101: Property 'dialogConfiguration' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/dialog/mdl-simple-dialog.component.ngfactory.ts:283:20: Property 'buttons' is private and only accessible within class 'MdlSimpleDialogComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/snackbar/mdl-snackbar.service.ngfactory.ts:237:57: Property 'showIt' is private and only accessible within class 'MdlSnackbarComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/layout/mdl-layout.component.ngfactory.ts:170:42: Property 'header' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/layout/mdl-layout.component.ngfactory.ts:172:42: Property 'drawer' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/layout/mdl-layout.component.ngfactory.ts:174:42: Property 'content' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/layout/mdl-layout.component.ngfactory.ts:368:45: Property 'drawer' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:59:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:102:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:145:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:188:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:231:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:274:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:317:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/common/mdl-ripple.directive.ngfactory.ts:361:9: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/layout/mdl-layout-header.component.ngfactory.ts:97:48: Property 'onTransitionEnd' is protected and only accessible within class 'MdlLayoutHeaderComponent' and its subclasses.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/layout/mdl-layout-header.component.ngfactory.ts:101:48: Property 'onClick' is protected and only accessible within class 'MdlLayoutHeaderComponent' and its subclasses.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/client/app/home/home.component.ngfactory.ts:231:42: Property 'header' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/client/app/home/home.component.ngfactory.ts:233:42: Property 'drawer' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/client/app/home/home.component.ngfactory.ts:235:42: Property 'content' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/button/mdl-button.component.ngfactory.ts:101:7: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/textfield/mdl-textfield.component.ngfactory.ts:355:9: Supplied parameters do not match any signature of call target.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/node_modules/angular2-mdl/components/textfield/mdl-textfield.component.ngfactory.ts:1239:20: Property 'inputEl' is private and only accessible within class 'MdlTextFieldComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/client/app/register/register.component.ngfactory.ts:271:42: Property 'header' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/client/app/register/register.component.ngfactory.ts:273:42: Property 'drawer' is private and only accessible within class 'MdlLayoutComponent'.
Error at C:/Users/w00t/Source/Repos/Test/src/Test.WebApplication/aot/client/app/register/register.component.ngfactory.ts:275:42: Property 'content' is private and only accessible within class 'MdlLayoutComponent'.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
jlee1201commented, Feb 9, 2017

no offense intended. I was responding to your “aot works for me” comment. I went ahead and made fixes and submitted PR

1reaction
jlee1201commented, Feb 7, 2017

While I confirmed that your angular-cli based starter works with AoT, it is not working for me using https://github.com/AngularClass/angular2-webpack-starter – I get same errors around property scope as @leolorenzoluis . angular2-mdl is the only package out of 15+ that we are using that does not work with the angular2-webpack-starter repo 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Out of memory error when building with AOT #3651 - GitHub
When I run ng build --prod --aot it goes fine until 40%, then it becomes slow, and once it gets to 64% it...
Read more >
Angular cli build with AOT(--prod) is throwing error on run time ...
Angular cli build with AOT(--prod) is throwing error on run time on click of mat-autocomplete or any other material element, the error am ......
Read more >
AOT metadata errors - Angular
The compiler encountered a referenced to a locally defined symbol that either wasn't exported or wasn't initialized. Here's a provider example of the...
Read more >
Angular: Writing AoT-friendly applications | by David - Medium
However, with AoT compilation ( ng build --prod ), we encounter several errors. We will talk through this errors and look how to...
Read more >
Error in build using AOT - microTVM - Apache TVM Discuss
Hi @manupa-arm, @areusch, I was trying to generate build (AOT enabled) as follows: def ... But the build throws following error:
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