$ drush ckeditor5_markdown_editor:install

Output:

TypeError: Drupal\ckeditor5_markdown_editor\Command\CliCommandWrapper::__construct(): Argument #1 ($libraryDiscovery) must be of type Drupal\Core\Asset\LibraryDiscovery, Drupal\Core\Asset\LibraryDiscoveryCollector given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in /var/www/html/web/modules/contrib/ckeditor5_markdown_editor/src/Command/CliCommandWrapper.php on line 69 #0 /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\ckeditor5_markdown_editor\Command\CliCommandWrapper->__construct()
#1 /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
#2 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(289): Drupal\Component\DependencyInjection\Container->get()
#3 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(253): Drush\Runtime\LegacyServiceInstantiator->resolveFromContainer()
#4 [internal function]: Drush\Runtime\LegacyServiceInstantiator->resolveArgument()
#5 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(223): array_map()
#6 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(193): Drush\Runtime\LegacyServiceInstantiator->resolveArguments()
#7 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(167): Drush\Runtime\LegacyServiceInstantiator->instantiateObject()
#8 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(117): Drush\Runtime\LegacyServiceInstantiator->create()
#9 /var/www/html/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php(54): Drush\Runtime\LegacyServiceInstantiator->instantiateServices()
#10 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(242): Drush\Runtime\LegacyServiceInstantiator->loadServiceFiles()
#11 /var/www/html/vendor/drush/drush/src/Boot/DrupalBoot8.php(218): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands()
#12 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(211): Drush\Boot\DrupalBoot8->bootstrapDrupalFull()
#13 /var/www/html/vendor/drush/drush/src/Boot/BootstrapManager.php(397): Drush\Boot\BootstrapManager->doBootstrap()
#14 /var/www/html/vendor/drush/drush/src/Application.php(219): Drush\Boot\BootstrapManager->bootstrapMax()
#15 /var/www/html/vendor/drush/drush/src/Application.php(185): Drush\Application->bootstrapAndFind()
#16 /var/www/html/vendor/symfony/console/Application.php(284): Drush\Application->find()
#17 /var/www/html/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRun()
#18 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#19 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#20 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#21 /var/www/html/vendor/bin/drush.php(119): include('...')
#22 {main}
TypeError: Drupal\ckeditor5_markdown_editor\Command\CliCommandWrapper::__construct(): Argument #1 ($libraryDiscovery) must be of type Drupal\Core\Asset\LibraryDiscovery, Drupal\Core\Asset\LibraryDiscoveryCollector given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\ckeditor5_markdown_editor\Command\CliCommandWrapper->__construct() (line 69 of /var/www/html/web/modules/contrib/ckeditor5_markdown_editor/src/Command/CliCommandWrapper.php).
 [warning] Drush command terminated abnormally.
Failed to run drush ckeditor5_markdown_editor:install: exit status 1

Comments

mornel created an issue. See original summary.

zaryab_drupal’s picture

@mornel The version you mentioned is not available for Drupal 11, I am attaching screenshot and URL of Drupal.org https://www.drupal.org/project/ckeditor5_markdown_editor/releases/1.0.x-dev

This below version is available for Drupal 11 and it successfully install in D11.
https://www.drupal.org/project/ckeditor5_markdown_editor/releases/1.0.0-...

zaryab_drupal’s picture

Status: Active » Needs review
mornel’s picture

@zaryab_drupal

Sorry, my mistake.

This is the one is causing the problem under Drupal 11.1.0

"drupal/ckeditor5_markdown_editor": "^1.0@beta",

mornel’s picture

Version: 1.0.x-dev » 1.0.0-beta2

Changed version to 1.0.0-beta2

curtistinkers’s picture

I fixed this by changing LibraryDiscovery to LibraryDiscoveryInterface in src/Command/CliCommandWrapper.php. I've attached a patch file.

curtistinkers’s picture

Title: Problem with Drupal 11.1.0 » CliCommandWrapper constructor requires LibraryDiscoveryInterface

  • sebastix committed 3939d0f4 on 1.0.x
    code strictness updates + fix issue #3494712 https://www.drupal.org/...
sebastix’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.