Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush and Composer commands have stopped working in Lando #144

Closed
theopposablethumb opened this issue Oct 30, 2024 · 3 comments
Closed

Drush and Composer commands have stopped working in Lando #144

theopposablethumb opened this issue Oct 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@theopposablethumb
Copy link

Drush has dissappeared from ALL of my local Drupal sites running on lando. I'm also unable to run composer commands.

I've even tried this with a fresh site in a test directory after running lando init, and I get the same issue. output from my terminal... each time I run drush on any existing or new sites I get a response with a list of lando commands and the question "did you mean ssh?"

lando composer require drush/drush
Brens:test apple$ lando drush site:install --db-url=mysql://drupal10:drupal10@database/drupal10 -y
Usage: lando <command> [args] [options]

Commands:
  lando config    Displays the lando configuration
  lando destroy   Destroys your app
  lando exec      Runs command(s) on a service
  lando info      Prints info about your app
  lando init      Fetched code and/or initializes a Landofile for use with lando
  lando list      Lists all running lando apps and containers
  lando logs      Displays logs for your app
  lando poweroff  Spins down all lando related containers
  lando rebuild   Rebuilds your app from scratch, preserving data
  lando restart   Restarts your app
  lando start     Starts your app
  lando stop      Stops your app
  lando update    Updates lando
  lando version   Displays lando version information

Options:
  --channel      Sets the update channel                                           [array] [choices: "edge", "none", "stable"]
  --clear        Clears the lando tasks cache                                                                        [boolean]
  --debug        Shows debug output                                                                                  [boolean]
  --help         Shows lando or delegated command help if applicable                                                 [boolean]
  --verbose, -v  Runs with extra verbosity                                                                             [count]

Examples:
  lando start               Run lando start
  lando rebuild --help      Get help about using the lando rebuild command
  lando destroy -y --debug  Run lando destroy non-interactively and with maximum verbosity
  lando --clear             Clear the lando tasks cache

Did you mean ssh?

Running lando composer doesn't do anything. I don't get a response, neither sucess nor fail

I can see a full set of files and directories in my vendor folders for both drush and composer

lando.yml file looks like...

name: test
recipe: drupal10
config:
  webroot: web

Everything was working perfectly this morning, but for some reason I started getting slow responses from docker, and then I noticed drush and composer commands stopped working completely. I stop and powered down lando and then restarted docker. That fixed the slow response but not drush nor composer are working.

Running lando start does run my site on localhost

I've run lando rebuild in all sites several times, the issue persists.

I've run lando update, the issue persists.

I've destroyed my docker containers and started them again. Even reinstalled docker... the issue persists. I can run my sites on localhost, but drush and composer commands are not working.
I installed a new test site again via lando init, following the steps on https://docs.lando.dev/plugins/drupal/getting-started.html fpr Drupal 10, but I get the same problem.

@theopposablethumb theopposablethumb added the bug Something isn't working label Oct 30, 2024
@theopposablethumb
Copy link
Author

I've also tried running lando db-import, and this isn't working either.

It's not available in my list of lando commands...

Brens:brenDrupalNew apple$ lando
Usage: lando [args] [options]


Commands:
  lando config    Displays the lando configuration
  lando destroy   Destroys your app
  lando exec      Runs command(s) on a service
  lando info      Prints info about your app
  lando init      Fetched code and/or initializes a Landofile for use with lando
  lando list      Lists all running lando apps and containers
  lando logs      Displays logs for your app
  lando poweroff  Spins down all lando related containers
  lando rebuild   Rebuilds your app from scratch, preserving data
  lando restart   Restarts your app
  lando start     Starts your app
  lando stop      Stops your app
  lando update    Updates lando
  lando version   Displays lando version information

Options:
  --channel      Sets the update channel                                           [array] [choices: "edge", "none", "stable"]
  --clear        Clears the lando tasks cache                                                                        [boolean]
  --debug        Shows debug output                                                                                  [boolean]
  --help         Shows lando or delegated command help if applicable                                                 [boolean]
  --verbose, -v  Runs with extra verbosity                                                                             [count]

Examples:
  lando start               Run lando start
  lando rebuild --help      Get help about using the lando rebuild command
  lando destroy -y --debug  Run lando destroy non-interactively and with maximum verbosity
  lando --clear             Clear the lando tasks cache

I used this command this morning, so no idea why it should stop working now...

@AaronFeledy
Copy link
Member

AaronFeledy commented Oct 30, 2024

Try this:

lando update -y
lando poweroff
lando destroy
lando --clear
lando start --debug
lando composer install

Keep an eye on the output of lando start --debug to see if there are any clues about what's failing.

@reynoldsalec
Copy link
Member

Sounds like a duplicate of https://github.com/lando/cli/issues/296, see steps to fix in lando/core#259

Going to close this out but definitely follow-up if that doesn't work/you have more questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants