Covalent: Wrong number of argument for theme in Angular material 7.0.0-beta.2

Created on 21 Sep 2018  路  3Comments  路  Source: Teradata/covalent

Bug Report

After upgrading to Angular material 7.0.0-beta.2 we encounter following exception when building the app:

ERROR in ./trainer/assets/material/material-theme.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--15-3!./trainer/assets/material/material-theme.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

undefined
          ^
      Wrong number of arguments (3 for 1) for `mat-elevation'
      in c:\dev\FitRockApp\node_modules\@angular\material\_theming.scss (line 447, column 12)
ERROR in ./trainer/assets/theme/main.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--15-3!./trainer/assets/theme/main.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

undefined
          ^
      Wrong number of arguments (3 for 1) for `mat-elevation'
      in c:\dev\FitRockApp\node_modules\@angular\material\_theming.scss (line 447, column 12)

This is caused by only importing covalent theme in our theming sass file:

@import '~@covalent/core/theming/all-theme';

This is likely related to the fact that mat-elevation has been removed from the stylesheet as mentioned in release notes for 7.0.0-beta.2

Most helpful comment

I fixed this by moving the @import '~@covalent/core/theming/all-theme'; before the @import '~@angular/material/theming';
It looks like covalent theme is overriding mat-elevation mixin.
I'm not sure if doing this has side effects, but it works for me, at least...

All 3 comments

Just upgraded to angular 7.0.2 (full release) and am still experiencing this issue.

I fixed this by moving the @import '~@covalent/core/theming/all-theme'; before the @import '~@angular/material/theming';
It looks like covalent theme is overriding mat-elevation mixin.
I'm not sure if doing this has side effects, but it works for me, at least...

@vu-bui Just tested it with Angular core 7.0.0 and Angular Material 7.0.1 and that seems to work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

georgeedwards picture georgeedwards  路  4Comments

jengstrm picture jengstrm  路  5Comments

asaph26 picture asaph26  路  3Comments

emoralesb05 picture emoralesb05  路  4Comments

d3viant0ne picture d3viant0ne  路  3Comments