-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Angular6 and CLI 6.0.7 getting build error for some libraries 'Please add a @NgModule annotation' #11215
Comments
This issue only seems to occur when using the --prod flag in the build script. When I build using --prod and I use --aot=false --build-optimizer=false it builds fine. This error seems to happen due to aot when the build is converting html and typescript files into javascript. |
This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please? You can read here why this is needed. A good way to make a minimal repro is to create a new app via |
@filipesilva will do. This is my first bug report on github and I'm swamped at work right now, so it may take me a few days to get to it. |
So in the process of making a repo-app, I couldn't get the problem to occur: Sorry for wasting your time. I guess you can close this issue. |
Issue still exists and not fixed at least in ng-cli 6.0.9. It's easy to reproduce. The problem is in classes re-re-export. Example: The code in some library: File ~/classes/index.ts: File ~/public_api.ts: If we import libaray to application, then everething works fine with |
@saaivs have you managed to find a solution for this? |
Last year we managed it by using the explicit full path to files. But currently, looks like, it works as expected with recent version of angular-cli. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This is a problem for multiple node libraries:
akveo/ng2-smart-table#801
willsoto/ng-chartist#198
The text was updated successfully, but these errors were encountered: