I'm installing Magento 2.4.1-p1 on a developers local using docker to create the environment. I have installed Magento and imported the DB

and run:

#This run just fine

composer update -vvv #This run just fine

php bin/magento setup:upgrade

#This run just fine

php bin/magento setup:di:compile

#Get the error here

php bin/magento setup:static-content:deploy -f

#Error Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Config\ReaderInterface in /www/projectname/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121 Stack trace: #0 /www/projectname/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array) #1 /www/projectname/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Framewo...') #2 /www/projectname/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #3 /www/projectname/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'reader', 'Magento\Framewo...') #4 /www/projectname/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.p in /www/projectname/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

I have tried deleting generated and var in app root, and flushed redis container

Any solution or suggestions will be appreciated

  • If you copied the database from a pre-existing location, make sure you updated the crypt key in env.php
    – Ryre
    Commented Apr 14, 2022 at 4:40
  • @rlock are you able to find solution for this? Commented Mar 29, 2023 at 19:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.