I am using the Magento 2.3.2 version. When I run the "setup:di:compile" command then Can't remove directory: directory is not empty error occurred.

enter image description here

I have also set the permission of the generated folder but no luck.

Please tell me how to do this ?

Thanks in Advance.

  • try completely deleting the contents of the generated/code folder – Marius Oct 3 '19 at 5:20
  • I have tried but same errror – Hardik Makwana Oct 3 '19 at 5:23

Give permission to generated folder from Terminal. Use below command

chmod -R -v 777 generated

After that run compile command and let me know if it's works.

| improve this answer | |

Remove generated folder with - sudo rm -rf generated/ Then execute -

1) bin/magento s:up

2) bin/magento setup:static-content:deploy -f

3) bin/magento setup:di:compile

| improve this answer | |
  • 1
    I have tried but no any luck – Hardik Makwana Oct 3 '19 at 5:30
  • 1
    @HardikMakwana, Happy coding help each other...! – Sanjay Gohil Oct 3 '19 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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