5

I have a serious issue which is ongoing with running

php bin/magento setup:static-content:deploy

First, I 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 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:

enter image description here

I have checked a few resources and followed the instructions but no luck, some followed are:

1) https://github.com/magento/magento2/issues/2273

2) Static content deploy issue

3) https://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: Removed follwoing folders via running
    • 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 help me, as it is urgent for me to resolve this.

Thank you in advance.

  • I would also check ownership of files and folders, when I delete pub/static or var/cache on my server they new files created belong to apache, and are not accessible. Still trying to figure this one out. – jamil Dec 29 '16 at 21:02
0

that is wired, It is file/directory ownership related issue, faced this issue while we run the command cache:clean and it gives error when you try to deploy static content again.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.