Reputation: 609
I added angular material in my project, Im getting this error. I removed my node modules and re-installed too. Even then Im getting this error.
Failed to compile.
./~/@angular/material/esm5/autocomplete.es5.js
Module not found: Error: Can't resolve '@angular/cdk/rxjs' in '/home/asus/angular-app/node_modules/@angular/material/esm5'
@ ./~/@angular/material/esm5/autocomplete.es5.js 16:0-89
@ ./~/@angular/material/esm5/material.es5.js
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:5454 ./src/main.ts
Upvotes: 2
Views: 9752
Reputation: 51
I experienced the same error. The version of "@angular/material" appearing in the dependencies defined in package.json, mismatched the one gotten by running the command:
npm show @angular/material version
It was solved by updating angular material to the latest version by running this command:
npm install @angular/material@latest --save
Check that the installed version matches the one defined in package.json.
Upvotes: 1