Sunday, February 24, 2019

ERROR in src/app/app.module.ts(6,10): error TS2305: Module '/node_modules/@angular/material/material"' has no exported member 'MdButtonModule'

Hi Guys ,

Today I have faced this error :


ERROR in src/app/app.module.ts(6,10): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdButtonModule'.

I got this error just after I installed angular meterial module which was missing.

The full stack trace is as below :


ERROR in src/app/app.module.ts(6,10): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdButtonModule'.
src/app/app.module.ts(6,26): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdInputModule'.
src/app/app.module.ts(6,41): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdCardModule'.



The solution is to replace modules which are deprecated in angular material with new ones.

MdButtonModule MdInputModule MdCardModule should be replaced with MatButtonModule MatInputModule MatCardModule 

No comments:

Post a Comment

ec2-user@ec2 Permission denied