Skip to content
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

WARNINGs all over the place #149

Closed
dolanmiu opened this issue Jul 3, 2017 · 12 comments
Closed

WARNINGs all over the place #149

dolanmiu opened this issue Jul 3, 2017 · 12 comments

Comments

@dolanmiu
Copy link

dolanmiu commented Jul 3, 2017

I am getting so many errors when using this library when using it with @angular/cli with this command:

$ ng build --prod

Repo URL:
https://github.com/dolanmiu/ng-color

Errors:

WARNING in ./src/$$_gendir/app/app.module.ngfactory.ts
130:1227-1233 "export 'ɵl' (imported as 'i59') was not found in 'ng-color'

WARNING in ./src/$$_gendir/app/app.module.ngfactory.ts
130:1235-1241 "export 'ɵl' (imported as 'i59') was not found in 'ng-color'

WARNING in ./src/$$_gendir/app/vehicles/vehicle-edit/vehicle-edit.component.ngfactory.ts
66:12-17 "export 'ɵc' (imported as 'i4') was not found in 'ng-color'

WARNING in ./src/$$_gendir/app/vehicles/vehicle-edit/vehicle-edit.component.ngfactory.ts
66:46-51 "export 'ɵc' (imported as 'i4') was not found in 'ng-color'

WARNING in ./src/$$_gendir/app/planning/planning-edit/planning-edit.component.ngfactory.ts
104:12-17 "export 'ɵc' (imported as 'i8') was not found in 'ng-color'

WARNING in ./src/$$_gendir/app/planning/planning-edit/planning-edit.component.ngfactory.ts
104:46-51 "export 'ɵc' (imported as 'i8') was not found in 'ng-color'

WARNING in ./src/$$_gendir/app/production/production-edit/production-edit.component.ngfactory.ts
36:12-17 "export 'ɵc' (imported as 'i4') was not found in 'ng-color'

WARNING in ./src/$$_gendir/app/production/production-edit/production-edit.component.ngfactory.ts
36:46-51 "export 'ɵc' (imported as 'i4') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
13:283-288 "export 'ɵl' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
13:290-295 "export 'ɵl' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
35:63-68 "export 'ɵe' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
37:12-17 "export 'ɵe' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
55:63-68 "export 'ɵh' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
57:12-17 "export 'ɵh' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
90:12-17 "export 'ɵa' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
90:46-51 "export 'ɵa' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
94:51-56 "export 'ɵa' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
115:63-68 "export 'ɵo' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
117:12-17 "export 'ɵo' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
134:63-68 "export 'ɵk' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
134:71-76 "export 'ɵl' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
136:12-17 "export 'ɵk' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
172:12-17 "export 'ɵc' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
172:46-51 "export 'ɵc' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
176:59-64 "export 'ɵc' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
199:49-54 "export 'ɵd' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
200:32-37 "export 'ɵm' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
220:12-17 "export 'ɵe' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
220:45-50 "export 'ɵe' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
222:61-66 "export 'ɵe' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
244:49-54 "export 'ɵd' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
245:127-132 "export 'ɵm' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
257:12-17 "export 'ɵh' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
257:45-50 "export 'ɵh' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
259:40-45 "export 'ɵh' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
281:49-54 "export 'ɵd' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
282:135-140 "export 'ɵn' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
297:12-17 "export 'ɵk' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
297:45-50 "export 'ɵk' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
297:53-58 "export 'ɵl' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
299:48-53 "export 'ɵk' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
320:142-147 "export 'ɵm' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
322:43-48 "export 'ɵm' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
345:32-37 "export 'ɵn' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
347:51-56 "export 'ɵn' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
371:49-54 "export 'ɵd' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
372:32-37 "export 'ɵn' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
392:12-17 "export 'ɵo' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
392:45-50 "export 'ɵo' (imported as 'i1') was not found in 'ng-color'

WARNING in ./src/$$_gendir/~/ng-color/ng-color.ngfactory.ts
394:65-70 "export 'ɵo' (imported as 'i1') was not found in 'ng-color'
@cheindl
Copy link

cheindl commented Jul 7, 2017

Got the same problem here.

@jvandemo
Copy link
Owner

jvandemo commented Jul 7, 2017

@dolanmiu — Can you please try:

$ ng build --prod --aot=false

If that works, the code in your library may not support AOT compilation.

@dolanmiu
Copy link
Author

dolanmiu commented Jul 8, 2017

ng build --prod --aot=false

Works fine, with no errors

How do I solve it?

@jvandemo
Copy link
Owner

jvandemo commented Jul 8, 2017

The problem you are facing is not related to the generator, but rather related to your code.

There are some good guidelines available on how to write a library that is AOT compatible:

I will close the issue for now because it is not related to this generator, but feel free to re-open if needed. Thanks!

@jvandemo
Copy link
Owner

@dolanmiu — Can you please try @sebastianteres' suggestions at #127 (comment)? Thanks!

@dolanmiu
Copy link
Author

Will do sometime this weekend

Thanks

@jvandemo
Copy link
Owner

@dolanmiu — Thank you, much appreciated 👍

@dolanmiu
Copy link
Author

Wow thank you that worked.

I had to export all components declared in my @NgModule for it to work. Maybe I have exported too many, but I am just happy it works now

@jvandemo
Copy link
Owner

@dolanmiu — Awesome, thank you for the confirmation 👍

@ianqueue
Copy link

so I'm getting this on a module I had built and compiled for AOT just fine... I've upgraded to @angular 4.2.6 now I see...

WARNING in ./src/$$_gendir/app/app.module.ngfactory.ts
106:849-855 "export 'ɵa' (imported as 'i22') was not found in '@tdaa/notifications'

WARNING in ./src/$$_gendir/app/app.module.ngfactory.ts
106:857-863 "export 'ɵa' (imported as 'i22') was not found in '@tdaa/notifications'

WARNING in ./src/$$_gendir/app/app.module.ngfactory.ts
106:883-889 "export 'ɵb' (imported as 'i22') was not found in '@tdaa/notifications'

WARNING in ./src/$$_gendir/app/app.module.ngfactory.ts
106:891-897 "export 'ɵb' (imported as 'i22') was not found in '@tdaa/notifications'

WARNING in ./src/$$_gendir/~/@tdaa/notifications/tdaa-notifications.ngfactory.ts
61:129-134 "export 'ɵa' (imported as 'i1') was not found in '@tdaa/notifications'

WARNING in ./src/$$_gendir/~/@tdaa/notifications/tdaa-notifications.ngfactory.ts
61:136-141 "export 'ɵa' (imported as 'i1') was not found in '@tdaa/notifications'

thoughts?

I've moved from export * from to be explicit... same issue. The kicker is this all used to compile.

thanks.

@Janatbek
Copy link

Did you run serve --preserve-symlinks?

@ianqueue
Copy link

ianqueue commented Sep 1, 2017

@Janatbek - is that so you can npm/yarn link your module and build with --aot with the cli and the cli won't complain since it's outside of the project folder?

Anyways, I figured things out as it was an issue in my code base I believe where I was defining and exporting an interface from my service and also importing that interface in the same file... curious if it was a VSCode plugin that thought at one point I wanted to import it so it threw the import line up at the top of the file.

I did what I always have to do is strip out all the code so that the base module compiles again and then slowly add back code... which is very painful as ng serve --aot takes forever to compile.

The kicker was it worked with angular 4.2.3... then when I went to 4.2.6 it stopped... guess they are tightening up the aot build with each new release which is good, but I just wish there was a better way to find AOT issues before hand like a linter etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants