Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] SassError: Undefined mixin. #126

Open
RameshW1 opened this issue Jul 6, 2022 · 6 comments
Open

[Bug] SassError: Undefined mixin. #126

RameshW1 opened this issue Jul 6, 2022 · 6 comments

Comments

@RameshW1
Copy link

RameshW1 commented Jul 6, 2022

Version

Angular 12

Reproduction link

Operating System

Mac

Device

mac

Browser & Version

Safari 15.2

Steps to reproduce

I am implementing this material dashboard in our project while implementing compile time error is coming like this below.
Could you please help me out on this issue?

./src/assets/scss/material-dashboard.scss - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined mixin.

7 │ ┌ @include hover {
8 │ │ color: $color;
9 │ │ background-color: $focus-background;
10 │ │ border-color: $focus-border;
11 │ └ }

What is expected?

Need to resolve this issue

What is actually happening?

While compelling itself it is coming this error.


Solution

Additional comments

Screenshot 2022-07-06 at 3 36 30 PM

@rarestoma
Copy link
Contributor

Hi @RameshW1,

Thank you for working with our products.

Did you modify something to the product? Also, what version of node are you using?

Thank you,
Rares

@RameshW1
Copy link
Author

RameshW1 commented Jul 7, 2022

Hi @rarestoma ,
Thank you for your support.
Yes. I am integrating this design to my project while integrating I am getting this error.
In package.json I have added all the library and I have added the css files also in the "assets" folder.

Node Version: v14.17.6

@estebanrepupilli
Copy link

Same issue here.
Tried everything at hand but couldn't resolve.
Can anyone help with this?

@nevseev
Copy link

nevseev commented Jun 28, 2023

Experiencing exact same issue with Angular 16 under Node v18. Has anyone found a solution for it yet?

@nevseev
Copy link

nevseev commented Jun 28, 2023

I've create a pull request to fix the above issue:

#150

@PKReejesh
Copy link

@nevseev your additions to the src/assets/scss/core/mixins/_hover.scss helped resolve the issue.

Additionally, in my version, I had to update

  1. Update button-size in src/assets/scss/core/_button.scss, removed $btn-lg-line-height parameter to match the definition.

  2. ng add @angular/material
    and
    @import "@angular/material/prebuilt-themes/indigo-pink.css"
    in src/assets/scss/material-dashboard.scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants