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.
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 :)
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