error TS1086: An accessor cannot be declared in an ambient context in Angular 9

后端 未结 7 1296
清酒与你
清酒与你 2021-02-03 18:14

I\'m learning Angular Material and I\'m getting this error when importing { MatButtonModule } from \"@angular/material/button\".

From what I read in other answers, it lo

相关标签:
7条回答
  • 2021-02-03 19:18

    According to your package.json, you're using Angular 8.3, but you've imported angular/cdk v9. You can downgrade your angular/cdk version or you can upgrade your Angular version to v9 by running:

    ng update @angular/core @angular/cli

    That will update your local angular version to 9. Then, just to sync material, run: ng update @angular/material

    0 讨论(0)
提交回复
热议问题