drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

[ERROR] Class Drupal\Core\DrupalKernel does not exist.

Open liquidcms opened this issue 4 years ago • 2 comments

Issue title

The ISSUE-GROUP should be one of:

  • console

Problem/Motivation

When running Drupal console i get: [ERROR] Class Drupal\Core\DrupalKernel does not exist. as well as: Drupal Console version 1.9.4 and usage hints as well as command summary; although command summary is not correct list of commands

Details to include:

  • Why are we doing this? Above all, a summary should explain why a change is needed, in a few short sentences.

How to reproduce

from drupal root folder: vendor/bin/drupal

Details to include:

  • Drupal version: 8.7.10
  • Console version: 1.9.4
  • Console Launcher version: n/a
  • OS: Windows 7

Working version Drupal 8.7.10 install. To start fresh (because composer dependencies preventing me from installing console)

  • delete composer.lock

  • delete /vendors folder

  • only thing in composer.json is require line for drush

  • install console: composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader --sort-packages

  • drush works

  • drupal site works

TEST: vendor\bin\drupal site:status

[ERROR] Class Drupal\Core\DrupalKernel does not exist.

[ERROR] Command "site:status", is not a valid command name.

Solution

??

liquidcms avatar Nov 28 '19 19:11 liquidcms

Install Drupal console per project and either export the project's vendor path to bash or use this path vendor/drupal/console/bin/drupal site:status This has worked for me for 3 sites, all with the same error.

iwzkid avatar Mar 11 '20 13:03 iwzkid

Hi I am using ubuntu 20.04 and Drupal 8.9 version and when running drupal list getting the following errors:

Drupal version: 8.9 Drupal console: 1.9.7

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Drupal\Console\Extension\Manager::__construct(), 3 passed and exactly 4 expected in /home/jeet/.config/composer/vendor/drupal/console/src/Extension/Manager.php:60 Stack trace: #0 [internal function]: Drupal\Console\Extension\Manager->__construct() #1 /home/jeet/.config/composer/vendor/symfony/dependency-injection/ContainerBuilder.php(1142): ReflectionClass->newInstanceArgs() #2 /home/jeet/.config/composer/vendor/symfony/dependency-injection/ContainerBuilder.php(618): Symfony\Component\DependencyInjection\ContainerBuilder->createService() #3 /home/jeet/.config/composer/vendor/symfony/dependency-injection/ContainerBuilder.php(1265): Symfony\Component\DependencyInjection\ContainerBuilder->doGet() #4 /home/jeet/.config/composer/vendor/symfony/dependency-injection/ContainerBuilder.php(1213): Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() #5 /home/jeet/.config/composer/vendor/symfony/dependency-injection/ContainerBuilder.php(111 in /home/jeet/.config/composer/vendor/drupal/console/src/Extension/Manager.php on line 60

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Drupal\Console\Extension\Manager::__construct(), 3 passed and exactly 4 expected in /home/jeet/.config/composer/vendor/drupal/console/src/Extension/Manager.php:60

jeetpatel avatar Oct 15 '21 16:10 jeetpatel