[console] Error when running Drupal console inside the site folder
I can't run Drupal console inside the site folder (I've tried in /vagrant/repos/drupal8 and /vagrant/repos/drupal8/web).
TypeError: Argument 1 passed to DrupalConsoleCoreUtilsTwigRenderer::__construct() must be an instance of DrupalConsoleCoreUtilsTranslatorManagerInterface, instance of DrupalConsoleUtilsTranslatorManager given in /vagrant/repos/dummysite/vendor/drupal/console-core/src/Utils/TwigRenderer.php on line 43 #0 [internal function]: DrupalConsoleCoreUtilsTwigRenderer->__construct(Object(DrupalConsoleUtilsTranslatorManager), Object(DrupalConsoleCoreUtilsStringConverter))
TypeError: Argument 1 passed to DrupalConsoleCoreUtilsTwigRenderer::__construct() must be an instance of DrupalConsoleCoreUtilsTranslatorManagerInterface, instance of DrupalConsoleUtilsTranslatorManager given in DrupalConsoleCoreUtilsTwigRenderer->__construct() (line 43 of /vagrant/repos/dummysite/vendor/drupal/console-core/src/Utils/TwigRenderer.php).
Hey @guardiola86, I had the exact same error with the same project versions you had except Console launcher version was 1.0.0-rc12. The following steps helped get rid of the error:
drupal self-update to update console launcher to the latest rc15 version.drupal init.After that I was able to run drupal list in the web root without errors but I struggled long to get there. Hope this helps.
@bruvers thanks for the reply ;)
This is no longer present in the version 1.9.0
Most helpful comment
Hey @guardiola86, I had the exact same error with the same project versions you had except Console launcher version was 1.0.0-rc12. The following steps helped get rid of the error:
drupal self-updateto update console launcher to the latest rc15 version.drupal init.After that I was able to run
drupal listin the web root without errors but I struggled long to get there. Hope this helps.