Doing a setup:static-content:deploy never finishes deploying files on a custom theme. Instead gives Compilation from source: frontend/Vendor/theme/en_US/css/email-fonts.less and then stops compiling.

Ran a grunt clean, grunt exec to remove all files in pub/static, var/*

No luck. Store is currently stuck in Client Side Compilation Mode, setting it to Server Side Compilation Mode renders no styles

Store is in Development mode, I am also unable to set to Production mode using deploy:mode:set production

Any help, insight is appreciated.

  • You can update full error message? Commented Jul 29, 2016 at 14:42
  • @Khoa TruongDinh frontend/CustomTheme/customtheme/en_US/css/email-fonts.less Compilation from source: frontend/CustomTheme/customtheme/en_US/css/email-fonts.less
    – user9139
    Commented Aug 11, 2016 at 19:33
  • So I went through and renamed my theme to "New/theme" and changed all the necessary files, composer.json, registation.php, etc and the New/theme compiles with no errors. I cleared out all of the customization files as well so it is basically a new theme. Strange thing is that I rename the theme back to the original "Custom/theme" and the Compilation from source: frontend/Custom/theme/en_US/css/email-fonts.less returns. Why would this happen? The files from New/theme and Custom/theme are exactly the same
    – user9139
    Commented Aug 12, 2016 at 1:33

3 Answers 3


A little late to the party but what if you rename the source frontend/Vendor/theme/web/css/source/email-fonts.less file to _email-fonts.less (notice the underscore)

I was just getting the same notices/errors with a less file on a theme I'm trying to fix (Smartwave/porto). As soon as added the underscore in front of the filename Magento stopped complaining during static content deploy.

Compilation from source: error

  • This resolved my issue. Thanks a lot. But this has happened after upgrading Magento 2.1.7 to 2.1.12. Do you know th exact reason why this is a problem ? Commented Apr 3, 2018 at 14:19

1) Make sure .htaccess file in pub\static location.

2) Make sure your custom theme is working correctly. Go to view source of home page & check the css/js files are coming. if these files are coming from custom theme then its ok. Run the following commands again

Grunt exec:theme-name Grunt watch

After that edit any css file if grunt showing files in console it mean everything is working.

  • custom theme is definitely loading up, I can see the appearance and stylesheet changes. However when I run setup:static-content:deploy, the entire css never finishes due to the Compilation from source error. So the static css styles are not all there and JS files do not get created. This is the issue is that this error does not finish compiling/deploying
    – user9139
    Commented Jul 25, 2016 at 20:28
  • Can you send me the error of screenshot so i find easily solution ? I think error in any Scss file . Make sure syntax is correct in Scss file.
    – Sourav
    Commented Jul 26, 2016 at 2:16
  • sorry for long wait on responseCompilation from source: frontend/CustomTheme/customtheme/en_US/css/email-fonts.less Compilation from source: frontend/CustomTheme/customtheme/en_US/css/email-fonts.less
    – user9139
    Commented Aug 11, 2016 at 19:31
  • the verbose error output is this#0 /Applications/MAMP/htdocs/local.devmagento2.com/web/vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php(155): Magento\Framework\Css\PreProcessor\Adapter\Less\Processor->processContent(Object(Magento\Framework\View\Asset\File)) #1 /Applications/MAMP/htdocs/local.devmagento2.com/web/vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php(115): Magento\Framework\View\Asset\PreProcessor\AlternativeSource->processContent('css/email-fonts...', '', '', Object(Magento\Framework\View\Asset\File\FallbackContext))....
    – user9139
    Commented Aug 11, 2016 at 19:39
  • version of M2 is 2.06
    – user9139
    Commented Aug 11, 2016 at 19:43

This is an old question, but apparently still relevant. I upgraded from Magento 2.1.x to 2.2.3 and got the exact error. My fix was very similar to floorz, I created an empty file in my theme, Vendor/Theme/web/email-fonts.css and the error ceased.

I've done 3 upgrades from 2.1 to 2.2 recently and none of them had this issue (they had plenty of other issues though). I'm not sure what was different about this installation.

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.