Magento – how to fix not generated css file from less while run static deploy command in magento 2

magento-2.1

Magento Version 2.1.9
Current Mode: production

After switched from developer to production mode, I ran the static deploy command but in that, I got the following error on CLI

$ php bin/magento setup:static-content:deploy
Requested languages: en_US
Requested areas: frontend, adminhtml
Requested themes: Magento/blank, Magento/luma, Sm/market, Magento/backend
=== frontend -> Magento/blank -> en_US ===
=== frontend -> Magento/luma -> en_US ===
=== frontend -> Sm/market -> en_US ===
=== adminhtml -> Magento/backend -> en_US ===

Compilation from source: /home/<yoursite.com>/public_html/vendor/magento/theme-frontend-blank/web/css/email.less
Compilation from source: 
frontend/Sm/market/en_US/css/email.less
Unable to get content for 'frontend/Sm/market/en_US/Magento_Bundle/css/source/_email.less'

Compilation from source: /home/<yoursite.com>/public_html/vendor/magento/theme-frontend-blank/web/css/email-inline.less
Compilation from source: 
frontend/Sm/market/en_US/css/email-inline.less
Unable to get content for 'frontend/Sm/market/en_US/Magento_Bundle/css/source/_email.less'

and due to this, above mention files are not generated on the pub/static folder so please suggest to me how to fix it in production mode?

Best Answer

Not enough info to detect the problem. Please answer some questions to debug your problems.

  • Show more theme structure
  • theme.js
  • did you have any email.less file on your theme??
  • Did you have any file.less include _email.less in Magento_Bundle module?
  • If you have file source.less or _module.less have included _email.less please remove that line, because default magento auto load emaill.less >> Style Email Template In Magento 2
  • Please check any empty .less files then remove them.
Related Topic