Problem in flex-layout comes when ran ng serve
I found a solution if someone having the same problems IDK if its the best to resolve but for me this works:
npm install @angular/[email protected]
Inside your project: Remove/delete flex layout from your package.json then run:
npm update
followed by:
npm install @angular/flex-layout@latest --save
This is will automatically install the latest version of flex thats compatible with your angular material.