During run bin/magento setup:di:compile getting following error, i gave 777 permission to generated folder still getting error. How to solve the following error,

Class Magento\Inventory\Model\Source does not exist
  Class Biztech\Inventorysystementerprise\Controller\Mobileassistantpro\Product\addNewProduct\Interceptor generation error: The requested class did not generate prop
  erly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory
   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 constru
  ct method, only.

1 Answer 1


Run this command from the CLI first :

sudo chmod -R 777 var/ generated/ 

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.