Illuminate\Console\Prohibitable was recently added. Use the latest version of Laravel 11.
Or match your Laravel version to your laravel-modules version. https://github.com/nWidart/laravel-modules
Hello
When i tried to deploy nwidart laravel module package using command " composer require nwidart/laravel-modules"
I got this error in terminal :
Trait "Illuminate\Console\Prohibitable" not found
at vendor\nwidart\laravel-modules\src\Commands\BaseCommand.php:17 13▕ use Symfony\Component\Console\Output\OutputInterface; 14▕ 15▕ use function Laravel\Prompts\multiselect; 16▕ ➜ 17▕ abstract class BaseCommand extends Command implements PromptsForMissingInput 18▕ { 19▕ use ConfirmableTrait; 20▕ use Prohibitable; 21▕
Whoops\Exception\ErrorException
Trait "Illuminate\Console\Prohibitable" not found
at vendor\nwidart\laravel-modules\src\Commands\BaseCommand.php:17 13▕ use Symfony\Component\Console\Output\OutputInterface; 14▕ 15▕ use function Laravel\Prompts\multiselect; 16▕ ➜ 17▕ abstract class BaseCommand extends Command implements PromptsForMissingInput 18▕ { 19▕ use ConfirmableTrait; 20▕ use Prohibitable; 21▕
1 vendor\filp\whoops\src\Whoops\Run.php:510 Whoops\Run::handleError("Trait "Illuminate\Console\Prohibitable" not found", "F:\Projects\train\training-app\vendor\nwidart\laravel-modules\src\Commands\BaseCommand.php")
2 [internal]:0 Whoops\Run::handleShutdown()
PHP Fatal error: Trait "Illuminate\Console\Prohibitable" not found in F:\Projects\train\training-app\vendor\nwidart\laravel-modules\src\Commands\BaseCommand.php on line 17 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
It solved !
For those who face the same problem when working with an old version of laravel such as v.10
You have to specify which version of the laravel modules you want to install that is compatible with the Laravel version
An example of the case here
composer require nwidart/laravel-modules 10
that's all
Please or to participate in this conversation.