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`