Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento2: After delete pub/static folder and making deploy, no css files found

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

like image 648
Anitr Avatar asked Jun 15 '16 13:06

Anitr


1 Answers

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.

like image 133
Ekta Puri Avatar answered Oct 29 '22 22:10

Ekta Puri