I have installed a fresh Magento 2.1 over the command line and always get the same fatal error when trying to access the frontend or backend.
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\Config\Scope\ReaderPoolInterface
Anyone experienced the same? I have found some resources but with no real help.
Update
I have deleted var/di and var/generation and set it to developer mode
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\Config\Scope\ReaderPoolInterface in /shop/build/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73 Stack trace: #0
/shop/build/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #1
/shop/build/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #2
/shop/build/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'readerPool', 'Magento\\Framewo...') #3
/shop/build/vendor/magento/framework/ObjectManager/Factory/Dynamic/Develo in /shop/build/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
Best Answer
If you use nginx configuration from the official sample and running Magento in the default/developer mode this situation might happen with document root global value set as
The issue can be fixed by setting Magento root from pub directory to the root index.php
In case of Apache the
DocumentRoot
value change might also fix the situation. Hope it will help.