bin/magento setup:di:compile throws Source class “-------” for “-------” generation does not exist

1k Views Asked by At

I downloaded a extension from github to my localhost and edited the Namespace/Module in the project. Everything seems alright but when i run the command php -dmemory_limit=5G bin/magento setup:di:compile i get the error

[RuntimeException] Source class "\Namespace\Module\Model\LogInterface" for "Namespace\Module\Model\LogRepository" generation does not exist.

Looking for other solutions, i added this in my etc/di.xml but it doest work

<type name="Magento\Framework\Model\Entity\RepositoryFactory">
        <arguments>
            <argument name="entities" xsi:type="array">
                <item name="Namespace\Module\Api\Data\LogInterface" xsi:type="string">Namespace\Module\Api\LogRepositoryInterface</item>
            </argument>
        </arguments>
    </type>

How else can i solve this ?

PS: i deleted the generation folder and run the command php bin/magento setup:static-content:deploy and after i run the php -dmemory_limit=5G bin/magento setup:di:compile but get same error

1

There are 1 best solutions below

0
On

Please try to run

php bin/magento setup:upgrade