0

Theme installed on magento is Porto. I made change in development environment and now i am deploying production mode and view of my website goes weird.

I am running following command. I tried to deploy production mode with language as well but no success.

First I tried to deploy normally, which failed and give me following error.

*Command returned non-zero exit code: `/usr/local/php70/bin/php-cli -f /home/username/public_html/bin/magento setup:static-content:deploy -f en_US fr_FR it_IT en_AU ar_SA de_DE`*

Then i tried to deploy production with language and the system trow another message of a missing file.

*

Compilation from source: /home/username/public_html/lib/web/mage/gallery/gallery.less
    .media-width is undefined in /home/username/public_html/var/view_preprocessed/pub/static/frontend/Magento/blank/en_US/css/source/lib/_responsive.less

*

enter image description here

  • Please check this post maybe can help you https://magento.stackexchange.com/questions/147633/magento-2-how-to-override-gallery-css – Nikolas Dec 15 '18 at 21:13
  • Thank you for you comment, but i couldn't figure out how to fix the problem. It was working just fine and all of the sudden the error starts to showing up when i try to deploy production mode. – Shah Faisal Dec 16 '18 at 09:39

1 Answers1

0

Follow this sequence, It may solve your issue

bin/magento setup:upgrade

bin/magento indexer:reindex

bin/magento setup:static-content:deploy

bin/magento setup:di:compile

bin/magento deploy:mode:set production

bin/magento setup:static-content:deploy

Merged JS and CSS do not work when Production mode

Prema Karthik
  • 418
  • 3
  • 12
  • => Still getting the same results.

    Error: Command returned non-zero exit code: /usr/local/php70/bin/php-cli -f /home/zzzzz/public_html/bin/magento setup:st atic-content:deploy -f en_US fr_FR it_IT en_AU ar_SA de_DE

    – Shah Faisal Dec 16 '18 at 09:20
  • => Then i tried to force to deploy production with language

    Error: Compilation from source: /home/goblondi/public_html/lib/web/mage/gallery/gallery .less .media-width is undefined in /home/zzzz/public_html/var/view_preprocessed/pu b/static/frontend/Magento/blank/en_US/css/source/lib/_responsive.less

    – Shah Faisal Dec 16 '18 at 09:23