I found a solution here:
References I used:
I was having dependency issues installing material, so I added this under dependencies in packages.json:
"@angular/animations": "~8.1.3"
Then I installed material using this command:
ng add @angular/material@8.0.0
I also didnt have angular installed so I used this to install angular:
npm install -g @angular/cli@8.1.3