My magento store is throwing this error:
Fatal error: Cannot instantiate interface Magento\Framework\View\Design\Theme\ResolverInterface in /Library/WebServer/Documents/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
I don't know why it started to appear. I made no new module installation. The store was working fine.
I've check file permissions and I see no issue there. Also delete the /var/ dir and, I think, all folders/files where created.
[EDIT] The preference is defined vendor/magento/magento2-base/app/etc/di.xml
<preference for="Magento\Framework\View\Design\Theme\ResolverInterface" type="Magento\Theme\Model\Theme\Resolver" />
Best Answer
If you use redis, run:
If you also use an environment like ansible (
lxc - server
), you'll need to do that command in container. Plus I did the following:var/generation
(orgenerated/*
in newer versions)var/cache
bin/magento module:enagle Some_Module
) or Enable all Magento modules:bin/magento module:enable --all
bin/magento setup:di:compile