laravel / scout

Laravel Scout provides a driver based solution to searching your Eloquent models.
https://laravel.com/docs/scout
MIT License
1.54k stars 327 forks source link

Artisan scout commands not defined. #805

Closed aerostah closed 6 months ago

aerostah commented 6 months ago

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.

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 commented 6 months ago

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!