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 MagentoFrameworkAppConfigScopeReaderPoolInterface
Anyone experienced the same? I have found some resources but with no real help.
I have deleted var/di and var/generation and set it to developer mode
Fatal error: Uncaught Error: Cannot instantiate interface MagentoFrameworkAppConfigScopeReaderPoolInterface in /shop/build/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73 Stack trace: #0 /shop/build/vendor/magento/framework/ObjectManager/ObjectManager.php(71): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create('Magento\Framewo...') #1 /shop/build/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): MagentoFrameworkObjectManagerObjectManager->get('Magento\Framewo...') #2 /shop/build/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): MagentoFrameworkObjectManagerFactoryAbstractFactory->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
Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.
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.
Make sure the PHP module intl is installed, clear
generation/* if you’re using Magento 2.2+) and
var/cache, enable Magento modules (
bin/magento module:enable --all), compile DI (
bin/magento setup:di:compile), and then try again.
After you downloaded all the files/created the project through composer, you must setup the store. You can do this from the command line:
php bin/magento setup:store-config:set --help
Or going to: http://mystore.com/setup
I also have this kind of problem when trying to run Magento cli like
magento list in the terminal. After several hours I tried the solutions but all the answers not work for me. it turns out that the
di.xml file is lost.
- Copy all the missing file from here :
- After that run the remove the cache :
rm -rf var/*.
- Now if you run
magento listthis will work again.
The steps I did were the following to get rid of this issue.
First I re-installed Magento completely new then I did this:
removed var/generation and var/cache
switched to developer mode to recompile
And suddenly it worked fine
Had the same issue caused by changing the code without cleaning the cache first. I manually cleaned the cache it solved the issue.
sudo rm -rf var/cache sudo rm -rf var/di sudo rm -rf var/generation
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0