【问题标题】:bin/magento setup:di:compile throws Source class “-------” for “-------” generation does not existbin/magento setup:di:compile throws Source class “-------” for “-------” generation不存在
【发布时间】:2018-11-15 17:05:02
【问题描述】:

我从 github 下载了一个扩展到我的本地主机,并在项目中编辑了命名空间/模块。一切似乎都很好,但是当我运行命令 php -dmemory_limit=5G bin/magento setup:di:compile 时出现错误

[运行时异常] “Namespace\Module\Model\LogRepository”生成的源类“\Nam​​espace\Module\Model\LogInterface”不存在。

寻找其他解决方案,我在我的 etc/di.xml 中添加了这个,但它不起作用

<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>

我还能如何解决这个问题?

PS:我删除了生成文件夹并运行命令php bin/magento setup:static-content:deploy,然后运行php -dmemory_limit=5G bin/magento setup:di:compile,但得到同样的错误

【问题讨论】:

    标签: magento2 magento2.1


    【解决方案1】:

    请尝试运行

    php bin/magento setup:upgrade
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-30
      • 1970-01-01
      • 2019-06-28
      • 2022-12-01
      • 2019-04-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多