nWidart / laravel-modules

Module Management In Laravel
https://docs.laravelmodules.com
MIT License
5.5k stars 954 forks source link

Trait "Illuminate\Console\Prohibitable" not found #1875

Closed FMpoli closed 3 months ago

FMpoli commented 3 months ago

Get this error during the installation had to comment 2 lines in vendor/nwidart/laravel-modules/src/Commands/BaseCommand.php to install

 Symfony\Component\ErrorHandler\Error\FatalError 

  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▕ 
alissn commented 3 months ago

Hi @FMpoli ,

What version of the Laravel framework and package are you trying to install?

chrismcintosh commented 3 months ago

I also just came across this issue.

Composer.json had the following

"laravel/framework": "^10.0",
"nwidart/laravel-modules": "^11.0",

After I downgraded laravel-modules to match the framework version everything worked again.

"laravel/framework": "^10.0",
"nwidart/laravel-modules": "^10.0",
alissn commented 3 months ago

@chrismcintosh

Laravel laravel-modules
5.4 ^1.0
5.5 ^2.0
5.6 ^3.0
5.7 ^4.0
5.8 ^5.0
6.0 ^6.0
7.0 ^7.0
8.0 ^8.0
9.0 ^9.0
10.0 ^10.0
11.0 ^11.0

this version mapping of package.

solomon-ochepa commented 2 months ago

This issue comes up when you are using Laravel 10.x and laravel-modules ^10.0.11

Either way, to solve this issue kindly use 10.0.10 instead of ^10.0.11