I've resolved this problem by adding missing properties to namespaces in node_modules/@types/material-ui/index.d.ts file. It worked for me. I don't think that it's a good solution and I'm wondering if there're some better approaches.

namespace DatePicker {
    export interface DatePickerProps {
        defaultDate?: Date;
        disableYearSelection?: boolean;


If it's a third party library you can add this above the line that is erroring out and it'll ignore the error and let you build:

// @ts-expect-error

Related Query

More Query from same tag