Skip to content

Intermittent: drush en fails with 'no commands defined in the pm namespace' in contrib CI #153

@rfay

Description

@rfay

Symptom

ddev drush en <module> -y fails with:

There are no commands defined in the "pm" namespace.
Failed to run drush en pathauto -y: exit status 1

The module is not listed in ddev drush pm:list --status=enabled, so the CI verify step also fails.

Observed in

What succeeds before the failure

All prior steps pass:

  • Clone ✓
  • DDEV config ✓
  • ddev-drupal-contrib addon ✓
  • DDEV start ✓
  • ddev poser ✓
  • DDEV restart ✓
  • ddev drush si minimal -y ✓ ← Drupal fully installed

Then immediately:

  • ddev drush en <module> -y ✗ ← pm namespace not found

Notes

  • The previous run against the same template code (commit b6c1e74, run 25684305046) passed cleanly for both pathauto and token
  • The error occurs AFTER a successful drush si, which requires the same Drush bootstrap, making a permanent version mismatch unlikely
  • Likely a timing or state issue after ddev restart / symlink-project, or a flaky interaction between the drush wrapper and the Drupal bootstrap in the web container
  • Worth investigating whether adding a short ddev drush cr or checking drush bootstrap status before ddev drush en would stabilize this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions