cancel
Showing results for 
Search instead for 
Did you mean: 

Running di:compile stops at 57%

SOLVED

Running di:compile stops at 57%

Hello,

I'm having some problems running di:compile, when running it stops at 57% with one error in braintree an braintreegraphql.

Those modules are both disabled, but the problem is still there.

 

Running compilation:

 

Compilation was started.
Interceptors generation... 4/7 [========>-----] 57% 19 secs 259.0 MiB
In Generator.php line 139:

Class Magento\Braintree\Gateway\Config\Config does not exist
Class Magento\BraintreeGraphQl\Model\Resolver\CreateBraintreeClientToken\In
terceptor generation error: The requested class did not generate properly,
because the 'generated' directory permission is read-only. If --- after run
ning the 'bin/magento setup:di:compile' CLI command when the 'generated' di
rectory permission is set to write --- the requested class did not generate
properly, then you must add the generated class object to the signature of
the related construct method, only.

 

Hope someone can help me, since i found some solutions but none worked..

Thanks in advance,

 

Best regards,

Leonel Nunes

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Running di:compile stops at 57%

Hi @Leo27 

Try the following command once:

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

You can use sudo as well.


Then try following commands once n sequence to re generations.

 

chmod -R 0777 var/ pub/ generated/
rm -rf var/cache/* var/view_preprocessed/* generated/* pub/static/*
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush


If still you got the same error then run

composer update

and run the above commands again in sequence.

I hope it will help you!

View solution in original post

4 REPLIES 4

Re: Running di:compile stops at 57%

Hi @Leo27 

Try the following command once:

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

You can use sudo as well.


Then try following commands once n sequence to re generations.

 

chmod -R 0777 var/ pub/ generated/
rm -rf var/cache/* var/view_preprocessed/* generated/* pub/static/*
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush


If still you got the same error then run

composer update

and run the above commands again in sequence.

I hope it will help you!

Re: Running di:compile stops at 57%

Did you upgrade magento version recently ?

Magento 2 Professional Developer
https://nslayout.com/

Re: Running di:compile stops at 57%

Hello Mr. Vimal and thanks for the support.

I've already tried something similar, but I will try exactly as you posted.

As soon as it's done I'll inform if it worked.

Thanks again Smiley Happy

 

Best regards,

Leonel Nunes

Re: Running di:compile stops at 57%

Hello Mr. Vimal, it worked after composer update Smiley Happy.

 

php bin/magento setup:di:compile
Compilation was started.
Interception cache generation... 7/7 [============================] 100% 1 min 407.0 MiB

 

Thanks for the great support

 

Best regards,

Leonel Nunes