2

I have submitted a module to the marketplace, I have tested it by all cases. I have switched to production mode but I am not getting any errors. However, I am getting a failure on submission with the below errors.

Enabling maintenance mode Starting compilation Something went wrong while compiling generated code. See the error log for details. Disabling maintenance mode Command returned non-zero exit code: /usr/bin/php -f /var/www/html/bin/magento setup:di:compile

Environment: PHP 7.1.22 Magento 2.3 CE php bin/magento deploy:mode:set production

3 Answers 3

2

I would suggest the below steps to fix this kind of issue.

1) Remove var/* generation/* and try to run that command again. And provide proper permission for var/ generation and pub folder.

2) Check logs and see if you find any issue, please fix it and try again.

3) Try to update the PHP.INI values.

php.ini values are:

post_max_size = 1024M 
upload_max_filesize = 1024M 
memory_limit = 3G 
max_execution_time = 500

Hope this will help you.

1
  • thank you, but I am not getting errors, MarkePlace review gets an error. Dec 21, 2019 at 6:21
1

Change the mode and skip the compilation:

php magento deploy:mode:set production --skip-compilation

php magento setup:static-content:deploy en_GB

Magento default locale is en_US so you have to define your language.

If that fails, make sure your /var and pub/ have the correct permissions

It could be that your PHP is exhausted so increasing the limit in php.ini should help but skipping the compilation and compiling after switch is a good workaround.

Also, make sure your store in use has a valid theme selected, it might be that you are using a theme that doesn't exist in the system.

0

This error means that the extension prevents product and category pages from being cached by Varnish. One possible cause is using cacheable="false" in one or more blocks on product and category pages.

Additional resources: https://devdocs.magento.com/guides/v2.4/config-guide/varnish/config-varnish.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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