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.

0.1.3 broke AoT compiling (Function calls are not supported in decorators but 'MsalModule' was called)

See original GitHub issue

I’m submitting a…


[x] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report 
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Library version

Library version: 0.1.3

Current behavior

When compiling using the AoT compiler (ng serve --aot or ng build --prod) it’ll throw this error:

ERROR in Error during template compile of 'AppModule'
  Function calls are not supported in decorators but 'MsalModule' was called.

Expected behavior

No error

Minimal reproduction of the problem with instructions

Upgrade to "@azure/msal-angular": "0.1.3" and run ng serve --aot

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
snebjorncommented, Aug 7, 2019

I can confirm that ^0.1.4-beta.1 can compile using the AoT compiler 👍

1reaction
jasonnuttercommented, Sep 3, 2019

This has been fixed with the betas, and will be included in the next release. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get rid of Function calls are not supported in ...
ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'ChartModule' was called. Now, i know ...
Read more >
Solving AOT Error in NgRx: Function calls are not supported in ...
However when you build the Angular project using prod mode (AOT by default) ... Function calls are not supported in decorators but 'createAction'...
Read more >
Ahead-of-time (AOT) compilation - Angular
The compiler only supports metadata for the Angular decorators in the @angular/core module. Function calls, Factory functions must be exported, named functions.
Read more >
[Solved]-How to get rid of Function calls are not supported in ...
Coding example for the question How to get rid of Function calls are not supported in decorators in Angular aot compiling?-angular.js.
Read more >
The Ahead-of-Time (AOT) compiler - Angular
Most importantly, the compiler only generates code to create instances of certain classes, support certain decorators, and call certain functions from the ...
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