mirror of
https://github.com/koel/koel.git
synced 2026-04-25 08:46:00 +03:00
[GH-ISSUE #1903] [Bug]:Class "Faker\Factory" not found #1027
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#1027
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sovereignalmida on GitHub (Feb 28, 2025).
Original GitHub issue: https://github.com/koel/koel/issues/1903
Originally assigned to: @phanan on GitHub.
Read the Troubleshooting guide.
Reproduction steps
1.Install Koel
2. Run koel:doctor
3. fix errors
4. ... Class Faker\Factory not found error persists
Expected behavior
No errors when running koel:doctor
Actual behavior
I have been struggling with getting koel running correctly and am now down to this last error when running koel:doctor
Class "Faker\Factory" not found
at vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php:93
89▕ $this->app->singleton(FakerGenerator::class, function ($app, $parameters) {
90▕ $locale = $parameters['locale'] ?? $app['config']->get('app.faker_locale', 'en_US');
91▕
92▕ if (! isset(static::$fakers[$locale])) {
➜ 93▕ static::$fakers[$locale] = FakerFactory::create($locale);
94▕ }
95▕
96▕ static::$fakers[$locale]->unique(true);
97▕
11 app/Console/Commands/DoctorCommand.php:164
App\Models\Artist::factory()
12 app/Console/Commands/DoctorCommand.php:68
App\Console\Commands\DoctorCommand::checkServiceIntegrations()
Logs
www-data@85b72198d31e:~/html/storage/logs$ cat laravel.log
[2025-02-28 14:55:56] production.ERROR: Class "Faker\Factory" not found {"exception":"[object] (Error(code: 0): Class "Faker\Factory" not found at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php:93)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(908): Illuminate\Database\DatabaseServiceProvider->Illuminate\Database\{closure}()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->build()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(957): Illuminate\Container\Container->resolve()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Foundation\Application->resolve()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(942): Illuminate\Container\Container->make()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Factory.php(850): Illuminate\Foundation\Application->make()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Factory.php(153): Illuminate\Database\Eloquent\Factories\Factory->withFaker()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Factory.php(171): Illuminate\Database\Eloquent\Factories\Factory->__construct()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Factory.php(829): Illuminate\Database\Eloquent\Factories\Factory::new()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/HasFactory.php(16): Illuminate\Database\Eloquent\Factories\Factory::factoryForModel()
#10 /var/www/html/app/Console/Commands/DoctorCommand.php(164): App\Models\Artist::factory()
#11 /var/www/html/app/Console/Commands/DoctorCommand.php(68): App\Console\Commands\DoctorCommand->checkServiceIntegrations()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\DoctorCommand->handle()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#18 /var/www/html/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\Component\Console\Command\Command->run()
#20 /var/www/html/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run()
#21 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#22 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run()
#24 /var/www/html/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#25 {main}
"}
Koel version
latest
How did you install Koel?
Official Docker image
Additional information
@albedev commented on GitHub (May 10, 2025):
Sorry, It might be a common practice, but sometimes happens to forget it: did you run "composer install" command?
@phanan commented on GitHub (May 10, 2025):
@sovereignalmida Apologies, this totally fell through the cracks for me. @albedev: This is indeed a bug with the Docker build, which uses Koel's release archive, which in turn is built with
--prefer-dist --no-devComposer option. Since Faker and a couple of other packages are listed as dev dependencies, they're not included in the build. I'll issue a fix.