2

What is the reason behind the error as below:

Compilation from source: LESS file is empty: frontend/vendor/theme/en_GB/css/style.less

I am using a custom theme that inherits from the default blank theme. This error is getting logged in the exception.log file on every page accessed on the frontend. I even copied the _style.less file from blank theme into the custom theme and ran commands but the error persists.

Note: All the commands run fine without any error but still getting the above-mentioned error in exception.log

3 Answers 3

3

The solution was to place a file named "style.less" in my custom theme web/css folder. I am not sure why is this file necessary since all the CSS is inherited from the parent theme, so I just put one dummy class in it for now, will keep an eye if it's breaking any part of the theme.

0

I had similar issues on custom admin page, non of js and css files was loaded. I guess there was something with my injections. I did the recompilation bin/magento s:d:c and this did the trick and resolved the issue. Hope it will help someone who faced with same issues

0

I got a similar error when I was creating child theme from parent theme.

Compilation from source: /vendor/swissup/theme-frontend-breeze-blank/web/css/default.less
Compilation from source: LESS file is empty: frontend/Vendor/theme/en_US/css/default.less

This error was coming for me because I was using wrong parent theme name in my child theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>New Magento 2</title>
    <parent>Swissup/breeze-evolution</parent>
    <media>
        <preview_image>media/preview.png</preview_image>
    </media>
</theme>

When I corrected to

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>New Magento 2</title>
     <parent>Swissup/argento-breeze-evolution</parent>
    <media>
        <preview_image>media/preview.png</preview_image>
    </media>
</theme>

the error was gone.

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.