Production build with AoT throws error - Error encountered resolving symbol values statically
naveedahmed1 opened this issue · 2 comments
naveedahmed1 commented
When trying production build with AoT in Angular CLI, it throws the below error:
ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in /node_modules/ic-datepicker/node_modules/@angular/core/src/metadata/ng_module.d.ts, resolving symbol NgModule in /node_modules/ic-datepicker/node_modules/@angular/core/src/metadata.d.ts, resolving symbol NgModule in /node_modules/ic-datepicker/node_modules/@angular/core/src/core.d.ts, resolving symbol NgModule in /node_modules/ic-datepicker/node_modules/@angular/core/index.d.ts, resolving symbol IcDatepickerModule in /node_modules/ic-datepicker/dist/src/ic-datepicker.module.d.ts, resolving symbol IcDatepickerModule in /node_modules/ic-datepicker/dist/src/ic-datepicker.module.d.ts
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '\src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts
I have imported the IcDatepickerModule module like this in my module:
import { IcDatepickerModule } from 'ic-datepicker/dist';
If I update the import to the following:
import { IcDatepickerModule } from 'ic-datepicker';
and delete all contents of node_modules\ic-datepicker
and then copy paste the contents of node_modules\ic-datepicker\dist in node_modules\ic-datepicker. It works. Can you please have a look?
IckleChris commented
I'm looking into the build issues now but it's going to take some research from my side - is this not a duplicate of #3?
naveedahmed1 commented
Yes indeed, I am sorry I just realized.