2

When I run this command php bin/magento setup:di:compile got the error below:

[ReflectionException]                                             
Class Magento\Catalog\Model\Product\Link\Resolver does not exist.
4

please check your vendor/magento folder the Resolver class should be exist in this path :

<folder_root>/vendor/magento/module-catalog/Model/Product/Link/

if you don't see the class file maybe it's deleted or there is something wrong in your magento installation

as @Miroslav Petroff comment, it could be 3rd extension that inject existing core class. you can checking again 3rd extension that already install in your magento project :)

  • I have checked Link folder does not exist under product folder. – Masud Shaikh Sep 3 '18 at 7:26
  • 1
    Did you upgrade your Magento instance recently? Maybe some 3rd party extension is trying to inject this class and it's no longer available in the recent versions of Magento 2. Can you try to search is this class is used under app/code in any 3rd party module? – Miroslav Petroff Sep 3 '18 at 7:34
  • just copy again code <folder_root>/vendor/magento/module-catalog/Model/Product/Link/Resolver.php from your fresh installation magento2 folder to your project folder, I hope it only just deleted accidentally – mrfizh Sep 3 '18 at 7:38
  • if you've copied and still found same error, so I think @MiroslavPetroff is right, you can looking for again for 3rd party extension maybe there is custom extension which inject that core class. – mrfizh Sep 3 '18 at 7:40
  • I have used 3rd party extension and now i removed it. Then the command is working fine. Thanks! – Masud Shaikh Sep 3 '18 at 7:42

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.