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

Facing an error with Drush 12.5.3 on D10.1.8 , even no other custom Drush command is working #6116

Open
SouravPaul1999 opened this issue Sep 23, 2024 · 0 comments

Comments

@SouravPaul1999
Copy link

Describe the bug
When trying to execute any custom drush command facing an error with drush ^12.4 on Drupal10.1.8, PHP 8.1

Here I'm sharing the output along with the drush command:

  1. I've created this command to update the node of account content type on executing this command getting the below error.

`lando drush -v account:update-roles-based-subscription
[info] Drush bootstrap phase: bootstrapDrupalRoot()
[info] Change working directory to /app/docroot
[info] Initialized Drupal 10.1.8 root directory at /app/docroot
[info] Drush bootstrap phase: bootstrapDrupalSite()
[info] Initialized Drupal site default at sites/default
[info] Drush bootstrap phase: bootstrapDrupalConfiguration()
[info] Drush bootstrap phase: bootstrapDrupalDatabase()
[info] Successfully connected to the Drupal database.
[info] Drush bootstrap phase: bootstrapDrupalFull()

In Application.php line 657:

[Symfony\Component\Console\Exception\NamespaceNotFoundException]
There are no commands defined in the "account" namespace.

Exception trace:
at /app/vendor/symfony/console/Application.php:657
Symfony\Component\Console\Application->findNamespace() at /app/vendor/symfony/console/Application.php:708
Symfony\Component\Console\Application->find() at /app/vendor/drush/drush/src/Application.php:235
Drush\Application->bootstrapAndFind() at /app/vendor/drush/drush/src/Application.php:191
Drush\Application->find() at /app/vendor/symfony/console/Application.php:262
Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:174
Symfony\Component\Console\Application->run() at /app/vendor/drush/drush/src/Runtime/Runtime.php:110
Drush\Runtime\Runtime->doRun() at /app/vendor/drush/drush/src/Runtime/Runtime.php:40
Drush\Runtime\Runtime->run() at /app/vendor/drush/drush/drush.php:139
require() at /app/vendor/drush/drush/drush:4
include() at /app/vendor/bin/drush:119`

  1. I've created this drush command to remove a role from user, on running this got the below error.

`lando drush -v user:paid-money-role-removal

[info] Drush bootstrap phase: bootstrapDrupalRoot() [info] Change working directory to /app/docroot [info] Initialized Drupal 10.1.8 root directory at /app/docroot [info] Drush bootstrap phase: bootstrapDrupalSite() [info] Initialized Drupal site default at sites/default [info] Drush bootstrap phase: bootstrapDrupalConfiguration() [info] Drush bootstrap phase: bootstrapDrupalDatabase() [info] Successfully connected to the Drupal database. [info] Drush bootstrap phase: bootstrapDrupalFull()

In Application.php line 725:

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "user:paid-money-role-removal" is not defined.

Did you mean one of these?
use
user-add-role
user-block
user-cancel
user-create
user-information
user-login
user-password
user-remove-role
user-unblock
user:block
user:cancel
user:create
user:information
user:login
user:password
user:role:add
user:role:remove
user:unblock

Exception trace: at /app/vendor/symfony/console/Application.php:725 Symfony\Component\Console\Application->find() at /app/vendor/drush/drush/src/Application.php:235 Drush\Application->bootstrapAndFind() at /app/vendor/drush/drush/src/Application.php:191 Drush\Application->find() at /app/vendor/symfony/console/Application.php:262 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:174 Symfony\Component\Console\Application->run() at /app/vendor/drush/drush/src/Runtime/Runtime.php:110 Drush\Runtime\Runtime->doRun() at /app/vendor/drush/drush/src/Runtime/Runtime.php:40 Drush\Runtime\Runtime->run() at /app/vendor/drush/drush/drush.php:139 require() at /app/vendor/drush/drush/drush:4 include() at /app/vendor/bin/drush:119`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant