I searched the web, but found no answer that would work:
I use Magento 2 custom theme and when I made changes to .less file, I wanted to compile files, so I deleted pub/static
folder and made deploy: php bin/magento setup:static-content:deploy.
After that, no css files are found in pub/static/frontend/<Theme>/default/css
.
Also, when I use grunt less
, I got errors:
>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-m.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-l.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email-inline.css not written because no source files were found.
I am in a developer mode.
Does anyone have any solution for this?
Thank you
I had the same issue, when I did grunt refresh
I got the same errors.
To resolve this I removed var/di
, var/cache
, var/generation
, var/page_cache
and the contents of pub/static
folder (be careful not to remove pub/static/.htaccess
).
Then I tried: grunt exec:themename
If successful do, grunt clean
If successful do, grunt refresh
And then, setup:static-content:deploy
This worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With