13

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 
[~/public_html]#
  • I set all permissions to 777
  • Set mode to "developer"

How can I find the error and fix it?

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

4 Answers 4

22

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.

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

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.

1
  • 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. Feb 7, 2020 at 5:26
0

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...

3
  • Where did you find the problem? In a file? In your browser?
    – Rick
    Nov 30, 2017 at 10:32
  • In ssh when site is in development mode, it displays the errors then 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
    Dec 1, 2017 at 13:40
0

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

Wrong:

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

Correct:

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

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.