There is an exception for ide-helper:generate command in a fresh installed laravel project :
Illuminate\Contracts\Container\BindingResolutionException
Target class [Illuminate\Database\Eloquent\Factory] does not exist.
at vendor/laravel/framework/src/Illuminate/Container/Container.php:811
807โ
808โ try {
809โ $reflector = new ReflectionClass($concrete);
810โ } catch (ReflectionException $e) {
โ 811โ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
812โ }
813โ
814โ // If the type is not instantiable, the developer is attempting to resolve
815โ // an abstract type such as an Interface or Abstract Class and there is
+25 vendor frames
26 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
include_factory_builders option to truephp artisan ide-helper:generatePer #1047, #1074, and the readme, include_factory_builders is deprecated for Laravel 8.0+. The fix (for now) is to set it to false and wait for #1074 to be completed and merged ๐๐ป
https://github.com/barryvdh/laravel-ide-helper/pull/1074 was merged and the fix will be part of the next release (no ETA)
Most helpful comment
Per #1047, #1074, and the readme,
include_factory_buildersis deprecated for Laravel 8.0+. The fix (for now) is to set it tofalseand wait for #1074 to be completed and merged ๐๐ป