Error during setup:di:compile

I am in developer mode and I get the below error while running setup:di:compile command. The logs also show the same error. I don’t know if anyone has encountered such an error.

Magento 2.4.5-p1. In Generator.php line 140:

Class “MagentoCatalogBlockProductData” does not exist

Class MagentoCatalogBlockProductAbstractProductsInterceptor generation error: The requested class did not generate properly, because the ‘generated’ directory permission is read-only. If — after running the ‘bin/magento setup:di:compile’ CLI command when the ‘generated’ d

irectory permission is set to write — the requested class did not generate properly, then y

ou must add the generated class object to the signature of the related construct method, only

.

submitted by /u/figonju
[link] [comments]