Score:-3

Trying to set drush

mg flag

First, I installed Lando which also installs Docker Desktop. After installing Lando, I opened the Windows Terminal and created a folder called "Sites". Inside the "Sites" folder, I created another folder named "my-first-drupal10-app". Then, I navigated to the "my-first-drupal10-app" folder and executed the following command: lando init --source cwd --recipe drupal10 --webroot web --name my-first-drupal10-app.

Next, I ran the command lando composer create-project drupal/recommended-project:10.0.x-dev@dev tmp && cp -r tmp/. . && rm -rf tmp to create a Drupal project. Once the project was set up, I started Lando with lando start". I didnt have containers so it created new ones.

After that, I needed to install Drush, so I used the command lando composer require drush/drush. Although the installation was successful, I encountered an error when trying to execute a Drush command.

`C:\Users\Hya\Sites\my-first-drupal10-app>lando drush
PHP Fatal error:  Uncaught Error: Class "Symfony\Component\HttpKernel\Kernel" not found in /app/vendor/drush/drush/src/Preflight/Preflight.php:209
Stack trace:
#0 /app/vendor/drush/drush/src/Runtime/Runtime.php(84): Drush\Preflight\Preflight->loadSymfonyCompatabilityAutoloader()
#1 /app/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /app/vendor/drush/drush/drush.php(77): Drush\Runtime\Runtime->run(Array)
#3 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
#4 /app/vendor/bin/drush(120): include('/app/vendor/dru...')
#5 {main}
  thrown in /app/vendor/drush/drush/src/Preflight/Preflight.php on line 209

Fatal error: Uncaught Error: Class "Symfony\Component\HttpKernel\Kernel" not found in /app/vendor/drush/drush/src/Preflight/Preflight.php:209
Stack trace:
#0 /app/vendor/drush/drush/src/Runtime/Runtime.php(84): Drush\Preflight\Preflight->loadSymfonyCompatabilityAutoloader()
#1 /app/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /app/vendor/drush/drush/drush.php(77): Drush\Runtime\Runtime->run(Array)
#3 /app/vendor/drush/drush/drush(4): require('/app/vendor/dru...')
#4 /app/vendor/bin/drush(120): include('/app/vendor/dru...')
#5 {main}
  thrown in /app/vendor/drush/drush/src/Preflight/Preflight.php on line 209`
id flag
Lando has a support community: https://docs.lando.dev/drupal/support.html. It is difficult to answer this question not knowing anything else about what you did for setup.
apaderno avatar
us flag
Welcome to Drupal Answers! Please do not use screenshots to show error messages; instead, copy and paste those error messages.
Score:0
us flag

For what it's worth, I've been working with Lando for only about a month. I've not had to install Drush separately. The lando drupal recipe installs Drush for you. Try just running "lando drush cr" to see if it works.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.