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

Artisan scout commands not defined. #805

Closed
aerostah opened this issue Feb 16, 2024 · 1 comment
Closed

Artisan scout commands not defined. #805

aerostah opened this issue Feb 16, 2024 · 1 comment

Comments

@aerostah
Copy link

Scout Version

10.8.3

Scout Driver

Typesense

Laravel Version

10.44.0

PHP Version

8.1.2

Database Driver & Version

MySQL 8.0.36

SDK Version

0.25.2

Meilisearch CLI Version

No response

Description

In the console, php artisan scout:import produced the following error:

scout ERROR  Command "scout" is not defined.
scout:import ERROR  There are no commands defined in the "scout" namespace.

Only Scout's commands are not acknowledged, it's as if the commands in boot() registration didn't process. All other

[2024-02-15 20:40:45] production.ERROR: There are no commands defined in the "scout" namespace. {"exception":"[object] (Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException(code: 0): There are no commands defined in the \"scout\" namespace. at /var/www/prod/vendor/symfony/consol>
[stacktrace]
#0 /var/www/prod/vendor/symfony/console/Application.php(720): Symfony\\Component\\Console\\Application->findNamespace()
#1 /var/www/prod/vendor/symfony/console/Application.php(266): Symfony\\Component\\Console\\Application->find()
#2 /var/www/prod/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
#3 /var/www/prod/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#4 /var/www/prod/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#5 {main}
"}

Things reviewed & attempted.

  • Confirmed scout commands are not returned when running the command php artisan list
  • Confirmed the presence of "laravel/scout": "^10.8" in composer.json
  • Ran composer update
  • Checked autoload_classmap.php and confirmed 'Laravel\\Scout\\Console\\ImportCommand' => $vendorDir . '/laravel/scout/src/Console/ImportCommand.php',
  • Cleared caches through artisan
  • Deleted bootstrap/cache
  • Confirmed contents of config/scout.php
  • Confirmed contents of config/app.php separately tried manually injecting Laravel\Scout\ScoutServiceProvider::class into service providers list, couldn't manually reference Facades, as they doesn't apply here.

I've never encountered anything like this before, usually it's a missing alias / Facade reference. I checked another another Ubuntu server environment and hit the same issue. Please feel free to point out anything that catches your attention.

Thank you.

Steps To Reproduce

php artisan scout:import "App\Models\Formula"

@crynobone
Copy link
Member

Hey there,

While this may be a legitimate issue, can you first try posting your problem or question on one of the support channels below? If this issue can be definitively identified as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!

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

2 participants