hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
940 stars 559 forks source link

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

Open liquidcms opened 4 years ago

liquidcms commented 4 years ago

Issue title

The ISSUE-GROUP should be one of:

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:

How to reproduce

from drupal root folder: vendor/bin/drupal

Details to include:

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

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

??

iwzkid commented 4 years ago

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.

jeetpatel commented 2 years ago

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