Search code examples
magentomagento2.4

No matching definition was found for `@family-name:'icons-blank-theme`


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

Solution

  • 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