2

We have upgraded Magento version from 2.3.4 to 2.4.2, while we execute deploy command we are facing below errors :

frontend/Magento/louellabelle/en_GB     3349/3580           ==========================>- 93%    12 secs
Compilation from source: /var/www/vhosts/lbstaging.com/htdocs/vendor/magento/theme-frontend-blank/web/css/styles-m.less
No matching definition was found for `@family-name:'icons-blank-theme', @font-path:"../fonts/Blank-Theme-Icons/Blank-Theme-Icons", @font-weight:normal, @font-style:normal, @font-display:block` in _icons.less on line 7, column 5
05| 
06| & when (@media-common = true) {
07|     .lib-font-face(

we have also tried adding below code to our custom css :

@font-face {
  font-family: 'icons-blank-theme';
  src: url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2') format('woff2'), url('../fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

hence we already have the files in the magento base location :

pub/static/frontend/Magento/louellabelle_new/en_GB/fonts/Blank-Theme-Icons

and

vendor/magento/magento2-base/lib/web/fonts/Blank-Theme-Icons
SagarPPanchal
  • 9,839
  • 6
  • 34
  • 62

2 Answers2

1

At last we have found the resolution for this :

        https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Static-content-deploy-error-after-upgrading-to-2-3-2/td-p/137756

        remove vendor/
        run : composer install

        removed files from : 

            /var/www/vhosts/domain/htdocs/app/design/frontend/vendor/module/web/css/source/lib

            and

            /var/www/vhosts/domain/htdocs/app/design/frontend/vendor/module/web/css/source/lib/

                _typography.less
                _navigation.less
                _forms.less

            /var/www/vhosts/domain/htdocs/app/design/frontend/vendor/module/web/css/source
            (all files) 

            /var/www/vhosts/domain/htdocs/app/code/vendor/module/Model/Magento/Sales/AdminOrder/styles-m.css

            NOTE : take backup first 

                /home/sagar/Documents/lblive/app/design/frontend/Magento/themename/web/css/source

        Execute, search and removed dependent .less files from the installed modules too in my case, app/design/Developer and Mirasvit/SearchAutocomplete extensions
SagarPPanchal
  • 9,839
  • 6
  • 34
  • 62
  • 1
    Thanks for the answer, I will take a look at it. Though I feel like this is just removing the file causing the issue instead of fixing it. Which makes me think it could get us trouble somewhere else in the future. But it seems you did that a year ago and stil don't encountered any issue so it should be fine. Thanks a lot ! – Claims Nov 07 '22 at 10:23
0

You need to update your .less files with the latest variable added on 2.4.2

Check how variables that show on dicompile error are setup in vendor for this files :

_typography.less styles-m.less

email-fonts.less

styles-m.min.css

Update the variables in your design directory when you overrode those files. Run

rm -rf var/cache/* var/page_cache/* pub/static/* var/view_preprocessed/*

bin/magento setup:upgrade && bin/magento setup:static-content:deploy && bin/magento setup:di:compile