In File.php line 150:

The contents from the

"D:/projects/directory/m2/pub/static/frontend/Smartwave/porto/en_US/css/styles-l.css" file can't be read. Warning!file_get_contents(D:/projects/directory/m2/pub/static/frontend/Smartwave/porto/en_US/css/styles-l.css): failed to open stream: No such file or directorysetup:static-content:deploy [-f|--force] [-s|--strategy [STRATEGY]] [-a|--area [AREA]] [--exclude-area [EXCLUDE-AREA]] [-t|--theme [THEME]] [--exclude-theme [EXCLUDE-THEME]] [-l|--language [LANGUAGE]] [--exclude-language [EXCLUDE-LANGUAGE]] [-j|--jobs [JOBS]] [--symlink-locale] [--content-version CONTENT-VERSION] [--refresh-content-version-only] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [--] [<languages>...]

Experiencing same issue on Magento 2.3, all pub/static directory seems to be in order apart from a missing css directory and styles.css


This is the result of a compilation error in the css. Its failing and then something next in the chain is erroring because a css file is missing. This can be a pain to debug. Have you tried running static content deploy with show errors. Failing that dump php output to file.

php -d display_errors=1 bin/magento setup:static-content:deploy

php -d bin/magento setup:static-content:deploy > output.log

  • Could be an inheritance problem. You might need to put empty styles-l.css in your theme. May 18 '19 at 16:48
  • Thanks guys i have create empty css files which are notified as missing.
    – user76990
    May 20 '19 at 5:44
  • Is this worked? Sep 23 '19 at 14:49

instead of already theme insert your theme information after that deploy it.

bin/magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy