Hi all,
I have a seirous 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 customm 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 too.
The errors are are as follows in the console and sytemm.log, too many related to all themes active such as blank and luma:
[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 checked a fw resources and followed the instructions but no luck, some followed are:
1) https://github.com/magento/magento2/issues/2273
2) http://magento.stackexchange.com/questions/108919/static-content-deploy-issue
3) http://stackoverflow.com/questions/37964713/not-able-to-deploy-static-content-magento2-0
4) 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.
Hi @m2newbie,
I just run the command in a unmodified Magento 2.1.3 instance and everything works as expected.
Are you sure that everything has been installed properly and that your instance meets all the Magento system requirements?
Here is a list of the Magento 2 system requirements:
http://devdocs.magento.com/guides/v2.1/install-gde/system-requirements-tech.html
Best regards.
Gabriel