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?

asked Aug 18, 2020 at 13:45

1 Answer 1

0

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

Starship
2614 silver badges11 bronze badges
answered Aug 18, 2020 at 13:46
1
  • Does not make a difference. Commented Aug 18, 2020 at 13:59

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.