The compile command suddenly stops, but there is no error.

[~/public_html]# php bin/magento setup:di:compile -vvv
Compilation was started.
Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 198.5 
  • I set all permissions to 777
  • Set mode to "developer"

How can I find the error and fix it?

  • Rick, did you find a sollution? I'm facing the same.... Commented Nov 23, 2017 at 9:43
  • No sorry... still no solution :(
    – Rick
    Commented Nov 28, 2017 at 8:43
  • any one find solution for same Commented Mar 12, 2021 at 10:37

4 Answers 4


In app/bootstrap.php (line 11). Enable ini_set('display_errors', 1);

Then run setup:di:compile again, you will see detail error message. It's already tested.

  • display_errors is 1 on mine - no error
    – Scott
    Commented Mar 11, 2019 at 19:12
  • That Worked for me. Thanks! Commented Jan 22, 2020 at 5:35
  • Worked like a charm for me. Thanks!
    – Shivani
    Commented Dec 29, 2020 at 7:59
  • Worked well for me!!!
    – kishan
    Commented Apr 13, 2022 at 16:24

Please check log file for the proper error.

We get the same issue at time of code compilation or in production. We resolved the same issue by removing the unnecessary backup files from the module.

  • Thank you so much @prince I have to face the same issue. I have to find the backup file in the config folder. while I have removed backup file in this folder. the compilation is working properly. Commented Feb 7, 2020 at 5:26

I found the problem! I installed al the modules from my life environment into a test and there an error appeared (in development mode). A module was corrupt, so i uninstalled the module and the problem was gone...

  • Where did you find the problem? In a file? In your browser?
    – Rick
    Commented Nov 30, 2017 at 10:32
  • In ssh when site is in development mode, it displays the errors then Commented Dec 1, 2017 at 11:10
  • Sadly, that's not the case with my Magento 2 installation. I'm in development mode, but no errors :(
    – Rick
    Commented Dec 1, 2017 at 13:40

I faced the same issue after extending a class. The problem was that there was a backslash missing:


class AbstractProduct extends Magento\Catalog\Block\Product\AbstractProduct


class AbstractProduct extends \Magento\Catalog\Block\Product\AbstractProduct

Your Answer

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

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