Skip to content

Getting compiler error while building app with ng build -prod #6

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

Open
proreytech opened this issue Jun 30, 2017 · 10 comments
Open

Getting compiler error while building app with ng build -prod #6

proreytech opened this issue Jun 30, 2017 · 10 comments
Labels

Comments

@proreytech
Copy link

Hi, I am using datepicker in my app and it works fine with ng build but fails with ng build -prod. I googled and it looks like AOT compiler issue with ControlValueAccessorProviderFactory

angular/angular-cli#4956

Here is error log:

prorey:provenbid proandrey$ ng build -prod
Hash: f7999b29dd0942099ae8                                                              
Time: 7383ms
chunk    {0} main.80551e71e70561828313.bundle.js (main) 1.33 kB {2} [initial] [rendered]
chunk    {1} styles.a5e033767d934a9d8d20.bundle.css (styles) 69 bytes {3} [initial] [rendered]
chunk    {2} vendor.c85a90b3d399a6fd167d.bundle.js (vendor) 1.04 MB [initial] [rendered]
chunk    {3} inline.a5d290ac24c45edf489b.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in Error encountered resolving symbol values statically. Calling function 'ControlValueAccessorProviderFactory', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol DatePicker in /Users/proandrey/Projects/provenbid/node_modules/angular-io-datepicker/src/datepicker/datePicker.d.ts, resolving symbol DatePicker in /Users/proandrey/Projects/provenbid/node_modules/angular-io-datepicker/src/datepicker/datePicker.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users/proandrey/Projects/provenbid/src'
 @ ./src/main.ts 5:0-74
 @ multi ./src/main.ts
@demodav
Copy link

demodav commented Aug 17, 2017

I am having the same issue

@b4p3p
Copy link

b4p3p commented Aug 20, 2017

me too

@mattn9x
Copy link

mattn9x commented Aug 22, 2017

Please help me. I am having the sample issue!

@WillAcon
Copy link

me too

1 similar comment
@xiaoshitou666
Copy link

me too

@khan8698
Copy link

me too!! any one got any solution ??

@WillAcon
Copy link

WillAcon commented Sep 1, 2017

try this: ng build --prod --aot=false

@khan8698
Copy link

khan8698 commented Sep 5, 2017

@WillAcon Thanks for the help... it works perfectly as i desired but there is a small problem. Can you tell me that is there any way (like setting any variable in configuration) where i can set configuration for setting "AOT" to false ?
Thanks

@shankargounder
Copy link

@WillAcon ng build --prod --aot=false it works fine but '--aot=false' increase our file size .. do u have any solution to reduce the size of file

Thanks

@muniraj65
Copy link

ERROR in Error encountered resolving symbol values statically. Calling function 'ControlValueAccessorProviderFactory', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol DatePicker in /Users/munirajselvam/projects/muniraj/employeetimesheet/app/web/app/agency/node_modules/angular-io-datepicker/src/datepicker/datePicker.d.ts, resolving symbol DatePicker in /Users/munirajselvam/projects/muniraj/employeetimesheet/app/web/app/agency/node_modules/angular-io-datepicker/src/datepicker/datePicker.d.ts

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

No branches or pull requests

10 participants