Drupal-console: [site:install] console.site_install - You have requested a non-existent service "extension.list.module".

Created on 7 Sep 2020  路  11Comments  路  Source: hechoendrupal/drupal-console

Problem/Motivation

When attepting to install a new site using site:install command, the following error is thrown:

console.site_install - You have requested a non-existent service "extension.list.module".

How to reproduce

  • Install Drupal 9 using composer.
  • Require drupal/console.
  • Create an empty database and put the database settings into sites/default/settings.php
  • Execute vendor/bin/drupal site:install

Most helpful comment

I have the same issue with drupal/core 8.9.6

How to reproduce

  1. Install Drupal 8 using composer
  2. Require drupal/console
  3. Set database settings in sites/default/settings.php
  4. Execute vendor/bin/drupal site:install

Error message

console.site_install - You have requested a non-existent service "extension.list.module".

The command "site:install" does not exist.

Package version

  • drupal/core 8.9.6
  • drupal/console 1.9.5
  • drupal/console-core 1.9.6
  • drupal/console-en 1.9.5
  • drupal/console-extend-plugin 0.9.4

Notes :

  • It worked with drupal/core 8.9.2 and drupal/console 1.9.4
  • I have the same issue when downgrading to drupal/console 1.9.4, so maybe this issue is caused by a change in drupal/core itself

I hope this could help.

Best regards

All 11 comments

I have the same issue with drupal/core 8.9.6

How to reproduce

  1. Install Drupal 8 using composer
  2. Require drupal/console
  3. Set database settings in sites/default/settings.php
  4. Execute vendor/bin/drupal site:install

Error message

console.site_install - You have requested a non-existent service "extension.list.module".

The command "site:install" does not exist.

Package version

  • drupal/core 8.9.6
  • drupal/console 1.9.5
  • drupal/console-core 1.9.6
  • drupal/console-en 1.9.5
  • drupal/console-extend-plugin 0.9.4

Notes :

  • It worked with drupal/core 8.9.2 and drupal/console 1.9.4
  • I have the same issue when downgrading to drupal/console 1.9.4, so maybe this issue is caused by a change in drupal/core itself

I hope this could help.

Best regards

Same here, trying to install Drupal 9.0.7 using Drupal Console without success.
Drupal Console version is 1.9.5

It seems this issue was introduced in Drupal 9 support commit where the Drupal deprecated system_rebuild_module_data() function was replaced by $this->extensionList->reset()->getList() from the @extension.list.module service injected in src/Extension/Manager.php to fix the deprecation.

Since there the site:install command is still in Drupal Console code but it isn't listed if you execute drupal to retreive the commands list.

It seems a problem related to the injection in fact deleting the @extension.list.module injection and so using \Drupal::service('extension.list.module')->reset()->getList() instead of $this->extensionList->reset()->getList() inside Manager::discoverExtensions in works again but with an error after the install which seems anyway done right

It seems this issue was introduced in Drupal 9 support commit where the Drupal deprecated system_rebuild_module_data() function was replaced by $this->extensionList->reset()->getList() from the @extension.list.module service injected in src/Extension/Manager.php to fix the deprecation.

Since there the site:install command is still in Drupal Console code but it isn't listed if you execute drupal to retreive the commands list.

Same here on Drupal 8.9.7. The PR #4277 patch is working great. Thanks :)

Same here on Drupal 8.9.7. The PR #4277 patch is working great. Thanks :)

Confirming. I'm on drupal 9.0.7

Hi,
I have the same issue, trying to use Drupal Console to install extension modules in a Drupal container.
Drupal version : 9.0.7
Drupal Console version : 1.9.7

Error message when executing the following command : drupal module:install jsonapi

Error: Call to undefined function Drupal\Console\Command\Shared\system_rebuild_module_data() in Drupal\Console\Command\Module\InstallCommand->calculateDependencies() (line 178 of /opt/drupal/vendor/drupal/console/src/Command/Shared/ProjectDownloadTrait.php).

Hi, I have the same issue.
Drupal version 9.0.10
Drupal Console version: 1.9.7

@ewuillai your command and error looks a bit different from the original reported here, thought the function in question may be similar. Did the patch #4277 fix the issue?

Same issue:

Drupal 9.0.10
Drupal Console 1.9.7
PR #4277 addresses the issue for me.

Same issue with drupal 8.9.11 and console 1.9.7

Was this page helpful?
0 / 5 - 0 ratings