export 'isFakeTouchstartFromScreenReader' was not found in '@angular/cdk/a11y'

Viewed 3945

I suddenly get the following errors in my Angular 11 project:

Error: ./node_modules/@angular/material/fesm2015/core.js 1091:45-77
"export 'isFakeTouchstartFromScreenReader' was not found in '@angular/cdk/a11y'

Error: ./node_modules/@angular/material/fesm2015/menu.js 786:17-49
"export 'isFakeTouchstartFromScreenReader' was not found in '@angular/cdk/a11y'

What I tried:

ng add @angular/material
npm i @angular/material
npm i
2 Answers

All you need to is npm i @angular/cdk. It appears to be a version mismatch and the command above should update the cdk to the corresponding version. Please correct me if I'm wrong/it changes.

I got this too when messing around with versions. Throw away node_modules folder, make sure your versions in package.json are in sync, and npm i

Related