'mat-expansion-panel' is not a known element when making build for poduction in angular 5

I am using lazy loading in my Angular 5 project and I have imported 'mat-expansion-panel' in one of the module. 'mat-expansion-panel' is working fine in development mode but when I make build for production it shows error that 'mat-expansion-panel' is not a known element without showing any line number.

I searched everywhere but didn't found anything.