magento2: php bin/magento setup:static-content:deploy displays errors in console
Preconditions
- PHP 5.6.29 (cli) (built: Dec 9 2016 07:40:09) Copyright © 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright © 1998-2016 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.7, Copyright © 2002-2016, by ionCube Ltd. with Zend OPcache v7.0.6-dev, Copyright © 1999-2016, by Zend Technologies
- mysql Ver 14.14 Distrib 5.6.35, for Linux (x86_64) using EditLine wrapper
- Magento 2.1.3 Developer Mode
Steps to reproduce
Setup Magento 2 Brand new through uploading files and running setup wizard and installtion success with no errrors.
Install new theme, run upgrade command and deploy static content succesfully with no errors.
After a day or 2, make changes and run deploy static command issues arises
Expected result
Run static deploy command with no issues or errors in console
Actual result
Givers many errrors for luma and blank theme, my custom theme
- Log
[2016-12-29 19:34:50] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_6d41d8cd98f00b204e9800998ecf8427e and handles : Please correct the XML data and try again. [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/blank/en_US/css/email-inline.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/email-inline.less
Compilation from source:
frontend/Magento/blank/en_US/css/email-inline.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/luma/en_US/css/email-inline.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/email-inline.less
Compilation from source:
frontend/Magento/luma/en_US/css/email-inline.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/blank/en_US/css/email-fonts.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/email-fonts.less
Compilation from source:
frontend/Magento/blank/en_US/css/email-fonts.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/luma/en_US/css/email-fonts.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/email-fonts.less
Compilation from source:
frontend/Magento/luma/en_US/css/email-fonts.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/blank/en_US/css/print.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/print.less
Compilation from source:
frontend/Magento/blank/en_US/css/print.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/luma/en_US/css/print.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/print.less
Compilation from source:
frontend/Magento/luma/en_US/css/print.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/blank/en_US/css/email.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/email.less
Compilation from source:
frontend/Magento/blank/en_US/css/email.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/luma/en_US/css/email.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/email.less
Compilation from source:
frontend/Magento/luma/en_US/css/email.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/blank [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/luma [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/blank [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/blank/en_US/css/styles-m.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/styles-m.less
Compilation from source:
frontend/Magento/blank/en_US/css/styles-m.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/blank [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/luma [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/luma/en_US/css/styles-m.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/styles-m.less
Compilation from source:
frontend/Magento/luma/en_US/css/styles-m.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/blank [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/blank/en_US/css/styles-l.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/styles-l.less
Compilation from source:
frontend/Magento/blank/en_US/css/styles-l.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/luma [] []
[2016-12-29 19:35:46] main.NOTICE: magento_import returns empty result by path css/source/_extend.less for theme Magento/luma [] []
[2016-12-29 19:35:46] main.CRITICAL:
Compilation from source:
frontend/Magento/luma/en_US/css/styles-l.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
[2016-12-29 19:35:46] main.CRITICAL: Compilation from source: /var/www/my-website.com/public_html/vendor/magento/theme-frontend-blank/web/css/styles-l.less
Compilation from source:
frontend/Magento/luma/en_US/css/styles-l.less
Unable to get content for 'frontend/Magento/luma/en_US/css/source/lib/_lib.less' [] []
I have a serious issue which is ongoing with running php bin/magento setup:static-content:deploy.
First I have installed magento 2.1.3 by uploading the files and run the setup wizard, all went fine, installed my theme and created a custom theme and all went fine whilst using the command etc.
But at some point, for whatever reason, the command ends up throwing many errors. The frontend has also lost functionality and no css and js is loading too.
The errors are above in the console and sytem.log, too many related to all themes active such as blank and luma.
I have checked a few resources and followed the instructions but no luck, some followed are:
-
http://magento.stackexchange.com/questions/108919/static-content-deploy-issue
-
http://stackoverflow.com/questions/37964713/not-able-to-deploy-static-content-magento2-0
-
How to fix the problem of loading css and javascript files? Login to ssh, go to magento directory for instance i’m cd /var/www/html/magento 1: rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/* 2: sudo chmod 777 var -R 3: sudo chmod 777 pub -R 4: sudo php bin/magento setup:static-content:deploy 5: Repeat step 2 & 3.
And some others I found on google but no resolution to the issue.
Please, please help me as it is urgent I resolve this.
Thank you in advance.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 26 (5 by maintainers)
Commits related to this issue
- Merge pull request #7994 from magento-cia/2.4.6-develop-2.4-develop-sync-11222022 Sync of 2.4.6-develop with 2.4-develop — committed to magento/magento2 by dvoskoboinikov 2 years ago
@andidhouse @maxbucknell Just informing you that I gave up on it and reinstalled Magento 2.1.3 for the 14th time as each time, different issues occur 😦 I have spent Around $6000 on extensions, customization etc. and it is a shame that it is this difficult to have a store running on Magento 2 without issues.
I honestly wish I listened to the few that advised not to migrate to Magento 2 last year some time and stick to Magento 1 for a long while but I didn’t listen and now paying for it. It has become very stresful now and time consuming as well as costly. Mainly concentrating on hiring developers in resolving bugs instead of actually working on the platform and making it what I would like my store to become. It’s bleeding me out.
So unfortunate but as much as I love Magento and what it offers, with much regret, I wish that I had invested in another platform now.
I truly hope that Magento 2, resolves many bugs in it’s next release which with the same hope is rather soon. Fingers crossed.
Please Magento 2, sort the majority of bugs out soon as resonably possible.
Thanking you in advance.
It seems like it’s failing to find the file
css/source/lib/_lib.less
in your compilation path. Please verify that the filelib/web/css/source/lib/_lib.less
exists in your installation, and please let me know the output of the commandfind var/view_preprocessed -name _lib.less
.turns out if there is something missing in the lib folder, this will never recover. In order to do so, download a fresh copy of magento and replace the lib folder.
I get the same error as GlobalOutsourcing.
I am not using Redis.
It was working when I was on 2.1.3 to 2.1.4. Never had any issue until some time recently it started to break when I was installing a plugin.
I have also tried updating it to 2.1.5 but the issue remains.