Closed WillCastor closed 7 years ago
I will look into this
Same problem here, maybe this helps: https://medium.com/@isaacplmann/making-your-angular-2-library-statically-analyzable-for-aot-e1c6f3ebedd5
I believe I have fixed this now, was having this on my company's project too
Tried running ng build --prod
on the company's project, and it seems ok
Thanks @leonhh for the guide
@dolanmiu production build seems to be working now indeed. Still getting loads of warnings in the browser/ng-cli console but at least I can do a production build now. Thanks for the effort.
Edit: also an error now
ERROR TypeError: r is not a constructor
Warnings:
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'
Yeah, i get that too, I thought it was only my machine when I do npm link
guess its a bigger problem
I am using generator-angular2-library to scaffold this, perhaps I will ask around to see whats up
@leonhh I have fixed this, no more uglyWARNING
s
Fixed on 3.0.6
when I use version 3.0.6, must:
import { NgColorModule } from 'ng-color/dist';
and it work well in debug mode,
when:
ng build --prod
error:
/src/$$_gendir/node_modules/ng-color/dist/ng-color.ngfactory.ts (1,1): Cannot find module 'ng-color'. src/$$_gendir/app/image-editor/pure-layer/pure-layer.component.ngfactory.ts (1,1): Cannot find module 'ng-color' src/$$_gendir/app/image-editor/image-editor.module.ngfactory.ts (1,1): Cannot find module 'ng-color' src/$$_gendir/app/app.module.ngfactory.ts (1,1): Cannot find module 'ng-color'.
try:
import { NgColorModule } from 'ng-color';
If that doesn't work, I will re-look into it. It works for me oddly enough
import { NgColorModule } from 'ng-color';
It can not pass build(prod or debug).
I found somthing strange:
ng-color/src/package.json version: 3.0.6
ng-color/dist/package.json version: 3.0.5
I see, I most likely published it wrong, I will amend this ASAP tomorrow with 3.0.7
Sorry for the inconvenience
Published 3.0.7
, let me know if you still have issues
OK! It works well!!
when I run command: 'ng build --prod' I get this ERROR:
No problem with 'ng server' and 'ng build'