# \$container not initialized after installation from sources (code and database)

I'm working on a site installed with Composer. After the local installation broke, I'm trying to reinstall the project from source code and the MySQL database. All the sources are versioned on Git (including the /vendor folder).

After Acquia installation, all the pages return a 500 error. When I run `drush ws` to debug, I get the following error message.

Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::\$container is not initialized yet. \Drupal::setContainer() must be called with a real container. in C:\workspaces\dev\AltaD8\web\core\lib\Drupal.php on line 130
#1 C:\Program Files (x86)\DevDesktop\tools\vendor\drush\drush\commands\core\drupal\environment.inc(141): Drupal::moduleHandler()
#2 C:\Program Files (x86)\DevDesktop\tools\vendor\drush\drush\lib\Drush\Boot\DrupalBoot.php(242): drush_module_exists('dblog')
#3 C:\Program Files (x86)\DevDesktop\tools\vendor\drush\drush\lib\Drush\Boot\DrupalBoot.php(73): Drush\Boot\DrupalBoot->drush_enforce_requirement_drupal_dependencies(Array)
#4 C:\Program Files (x86)\DevDesktop\tools\vendor\drush\drush\lib\Drush\Boot\BaseBoot.php(60): Drush\Boot\DrupalBoot->enforce_requirement(Array)
#5 C:\Program Files (x86)\DevDesktop\tools\vendor\drush\drush\includes\preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 C:\Program Files (x86)\DevDesktop\tools\vendor\drush\drush\drush.php(12): drush_main()
#7 {main} Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::\$container is not initialized yet. \Drupal::setContainer() must be called with a real container. in Drupal::getContainer() (line 130 of C:\workspaces\dev\AltaD8\web\core\lib\Drupal.php).
Drush command terminated abnormally due to an unrecoverable error.

Oddly, `drush cr` seems to work flawlessly.

How can I troubleshoot this? I don't know where to start.

• I suspect a custom module to be the source of this error, but i can't disable module as both admin and drush are not working. The issue is caused by importing the production database into other environments. It affect the dev server as well Jul 5 '21 at 13:06
• Double check your settings.php and drushrc.php files.
– Beau
Jul 14 '21 at 19:45