0

I get this error when I execute php bin/magento setup:static-content:deploy:

Compilation from source: /app/design/frontend/company/fresh/web/css/source/lib/extend/amasty/mega-menu/header.less
variable @md is undefined in file /var/view_preprocessed/pub/static/frontend/company/fresh/en_US/css/source/lib/extend/amasty/mega-menu/header.less in header.less on line 22, column 20
20| }
21|
22| @media (min-width: @md) {
23|     .ammenu-menu-toggle {
24|         &:not(.-hamburger) {
25|             margin: 0 .9rem;

It says variable @md is undefined, even though it is defined:

MY_THEME\web\css\source\_extend.less

@import 'lib/variables/responsive';  // <--- it is defined here

// Amasty
@import 'lib/extend/amasty/mega-menu/header';

Evidence:

MY_THEME\web\css\source\lib\variables\responsive.less

@xs: 0;
@xs_sm: 341px;
@xs_md: 381px;
@xs_lg: 471px;
@sm: 576px;
@md: 768px;
@lg: 992px;
@xl: 1200px;
@xxl: 1500px;

MY_THEME\web\css\source\lib\extend\amasty\mega-menu\header.less

@media (min-width: @md) {
    .ammenu-menu-toggle {
        &:not(.-hamburger) {
            margin: 0 .9rem;
        }

        .ammenu-icon:before, .ammenu-icon:after {
            background: #6d6d6d;
            width: 25px;
        }
    }
}

So why is the error showing?

The compilation is still successfull, but why are the errors showing?

1 Answer 1

0

Have you try this?

php bin/magento setup:static-content:deploy -f

1
  • Does not make a difference.
    – Black
    Commented Aug 18, 2020 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.