[AoT] Bundled metadata does not reflect metadata lowering // [PREV: Packaged library is not working in AOT mode]
See original GitHub issueType of Issue
[x] Bug Report
[ ] Feature Request
Description
I get the following error if I try to use my library in another project with ng serve --aot
:
ERROR in Error: Error encountered resolving symbol values statically. Calling function 'ɵa', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol SelectableListDirective in /home/niko/WebstormProjects/new-tutorial/whatsapp-client-angularcli-material/node_modules/ngx-selectable-list/ngx-selectable-list.d.ts, resolving symbol SelectableListDirective in /home/niko/WebstormProjects/new-tutorial/whatsapp-client-angularcli-material/node_modules/ngx-selectable-list/ngx-selectable-list.d.ts, resolving symbol SelectableListDirective in /home/niko/WebstormProjects/new-tutorial/whatsapp-client-angularcli-material/node_modules/ngx-selectable-list/ngx-selectable-list.d.ts
How To Reproduce
Just use this repo to build the package and import it in a new angularcli project: https://github.com/darkbasic/ngx-selectable-list/tree/packagr
If you want to see how exactly I use it have a look at this repo: https://github.com/Urigo/whatsapp-client-angularcli-material/tree/master-step6
Precisely look at Step 6.1
and Step 6.2
in the commit history.
Expected Behaviour
Should be able to use my library in AOT mode.
Version Information
ng-packagr: ^2.0.0-rc.5
@angular/*: ^5.0.0
typescript: ~2.4.2
rxjs: ^5.5.2
node: 9.2.0
npm/yarn: 5.6.0
https://github.com/darkbasic/ngx-selectable-list/blob/packagr/package.json
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Unable to run {N} application with AOT, Reflect.getMetadata is ...
When starting the application the error Reflect.getMetadata is not a function shows up and the application doesn't work.
Read more >Ahead-of-time (AOT) compilation - Angular
The Angular AOT compiler extracts metadata to interpret the parts of the application that Angular is supposed to manage. You can specify the...
Read more >Material 8 Libraries Not Working With Aot Mode - ADocLib
A schematic that is packaged with a library can for example provide the Angular CLI ... [AoT] Bundled metadata does not reflect metadata...
Read more >Spring Native documentation
During the native compilation, you will see a lot of WARNING: Could not register reflection metadata messages. They are expected and will be ......
Read more >Host and deploy ASP.NET Core Blazor WebAssembly
AOT does not trim out managed DLLs when the app is published. Blazor requires the DLLs for reflection metadata and to support certain...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @dherges this error is hunting me for weeks now so I wanted to prepare a minimal reproducible example located here https://github.com/georgiee/ng-packagr-foos and post it as an issue. Before I do that I wanted to check the current state of this problem.
I pinned my version of ng-packagr to
1.6.0
. I thought maybe you have addressed the problem in your different release candidates in the meantime. But even with the latest RC 11 I get the very same error when creating an AOT build.Do you have an official issue where you could link all appearances of this error, would it help to create such an issue so you can just link to it whenever it surfaces ?
Did you already had some time to dive into the problem and have a clue what might cause this?
And thank you so much for this tool and all the conventions you guys worked out. That’s so much better than maintaining your own packaging madness 🙌
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
This action has been performed automatically by a bot.