3

I am updating to Angular 12 from Angular 11. During ng serve, I am unable to compile this: https://material.angular.io/guide/typography#define-a-level

Backtrace

./src/custom-theme.scss - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after "...typography: mat": expected expression (e.g. 1px, bold), was ".define-typography-"
        on line 5 of src/custom-theme.scss
>> $custom-typography: mat.define-typography-config(

   -----------------------^

custom-theme.scss

@use '~@angular/material' as mat;

$custom-typography: mat.define-typography-config(
  $font-family: 'Lato, Helvetica'
);
@include mat.core($custom-typography);
...

My package.json has "node-sass": "^4.14.1",

Any ideas?

gruuuvy
  • 2,028
  • 4
  • 31
  • 52
  • Does this answer your question? [SassError: Can't find stylesheet to import. @use '~@angular/material' as mat;](https://stackoverflow.com/questions/67652012/sasserror-cant-find-stylesheet-to-import-use-angular-material-as-mat), [Angular material: SassError: Invalid CSS after "@include mat": expected 1 selector or at-rule, was ".core();"](https://stackoverflow.com/q/67527236/8017690) – Yong Shun Sep 24 '21 at 04:28

0 Answers0