-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AoT] [2.0.0] Metadata.json incomplete (Please add a @NgModule annotation.) #594
Comments
Closed in favour of duplicate issue #195. Fixed it by changing my index.ts barrel file:
|
Hi @dirkluijk, is it possible that you provide the reproduction ina GitHub project and just by running You already give me the most precise error description and instructions I have seen so far. If you could extract the repro, we'll be able to reach out to the Angular team about a fix. |
Hi @dherges. Thank you for taking time for this. I am really struggling with something else that is very hard to track down. I will give you access to a private repo. |
It will have to a "minimal reproduction" like three or four source files, a tsconfig and the resulting metadata.json file with a description what is wrong in the metadata. |
Here you go. I just pushed https://github.com/dirkluijk/ng-packagr-issue, which contains two directories:
Steps to reproduce:
(in case you get issues, remove the yarn.lock) You will get:
Which is similar to the issues I got earlier:
(anonymized names) When you remove the
Maybe my barrel approach is just wrong. But there is no circular reference, and I think this is just the way you should be able to use barrels. |
Maybe this is something that angular/cli has solved with a specific webpack configuration/option? |
Obsolete with VE removal |
This issue has been automatically locked due to inactivity. |
Type of Issue
Description
The generated metadata.json is missing lots of exports. This results in many
Please add a @NgModule annotation.
errors in my app.It may have to do with the fact that I am using barrel files?
How To Reproduce
package.json (simplified)
ng-package.json
public_api.ts
components/index.ts
generated my_lib.metadata.json
Expected Behaviour
It looks like the barrel exports are all overwritten by the last directory (barrel) export.
Version Information
The text was updated successfully, but these errors were encountered: