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.

AbilityModule is not AOT compatible

See original GitHub issue

Hello,

Trying to use the CASL Angular port, i find that it’s not AOT compatible when bundling it in AOT mode.

below the result after running ng serve --aot --port 2800 --locale fr --live-reload false command:

ERROR in Error: Unexpected value 'AbilityModule in ~/node_modules/@casl/angular/index.d.ts' imported by the module 'AppModule in ~/src/app/app.module.ts'. Please add a @NgModule annotation.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
stalniycommented, Nov 5, 2018

This is my another leftover 😃 planned in issue https://github.com/stalniy/casl/issues/5

I have already started an article but need some free time to finish it. I expect it to be published till the end of November.

You can read Readme of the project for examples of usage https://github.com/stalniy/casl/blob/master/packages/casl-angular/README.md

1reaction
stalniycommented, Nov 5, 2018

I’m currently out of time) finalizing projects on upwork.

But yes, I’ll take a look at this today. And there a quick solution than I’ll publish right after the fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular provider not provided in AOT - Stack Overflow
Yes, this is because anything a module declares/uses should be statically analyzable for AOT to work. See this for further information.
Read more >
Angular: Writing AoT-friendly applications | by David - Medium
Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function. It is caused in bttf....
Read more >
harmony(鸿蒙)Ability - seaxiang
The Ability module manages the ability lifecycle and context, such as creating and destroying an ability, and dumping client information.
Read more >
ng build fails if AOT is enabled (Angular 11) - DayPilot Forums
This likely means that the library (daypilot-pro-angular) which declares DayPilotModule has not been processed correctly by ngcc, or is not compatible with ...
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