Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property 'defaultColor' is missing in type 'NgxMatDatetimePicker<D>' but required in type 'CanColor'

While doing "ng build", I am facing the below errors.

ERROR in node_modules/@angular-material-components/datetime-picker/lib/datetime-picker.component.d.ts:52:22 - error TS2420: Class 'NgxMatDatetimePicker' incorrectly implements interface 'CanColor'.

and

node_modules/@angular/material/core/common-behaviors/color.d.ts:15:5 15 defaultColor: ThemePalette | undefined; ~~~~~~~~~~~~ 'defaultColor' is declared here.

like image 961
What If Avatar asked Sep 07 '20 08:09

What If


1 Answers

There appear to multiple recent github issues referencing the same problem: 1, 2. One of the comments state that downgrading to version @angular/material to version 10.1.3 seems to resolve the issue (see comment here) as a temporary workaround. In addition a fix seems to be in the works (see here), but hasn't yet been merged as of writing this.

For now your best bet is to fix the @angular/material version to 10.1.3

like image 80
etarhan Avatar answered Sep 22 '22 09:09

etarhan