kitloong / laravel-migrations-generator

Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.
MIT License
2.51k stars 278 forks source link

Error while using #196

Closed polishchukI closed 10 months ago

polishchukI commented 10 months ago

I have to bases in my project "system" and "info", and when a trying to export system base with a command string : php artisan migrate:generate --connection='system' --path='app/database/migrations', i am getting an error:

Argument 1 passed to KitLoong\MigrationsGenerator\Setting::setStubPath() must be of the type string, null given, called in D:\xampp\htdocs\proauto\vendor\kitloong\laravel-migrations-generator\src\MigrateGenerateCommand.php on line 228

at D:\xampp\htdocs\proauto\vendor\kitloong\laravel-migrations-generator\src\Setting.php:108 104| { 105| return $this->stubPath; 106| } 107|

108| public function setStubPath(string $stubPath): void 109| { 110| $this->stubPath = $stubPath; 111| } 112|

1 D:\xampp\htdocs\proauto\vendor\kitloong\laravel-migrations-generator\src\MigrateGenerateCommand.php:228
KitLoong\MigrationsGenerator\Setting::setStubPath()

2 D:\xampp\htdocs\proauto\vendor\kitloong\laravel-migrations-generator\src\MigrateGenerateCommand.php:193
KitLoong\MigrationsGenerator\MigrateGenerateCommand::setStubPath(Object(KitLoong\MigrationsGenerator\Setting)) PS D:\xampp\htdocs\proauto>

So, my question is, what am i dooing wrong? issue

kitloong commented 10 months ago

Hi @polishchukI

I am sorry, could you try this? https://github.com/kitloong/laravel-migrations-generator/issues/184

If it does not fix it, please try to repro the error with a new Laravel project.

polishchukI commented 10 months ago

Hi @polishchukI

I am sorry, could you try this? #184

If it does not fix it, please try to repro the error with a new Laravel project.

I tried this solution, it does not helped me. What is the difference clean project or not? Can you explain to me?

kitloong commented 10 months ago

Hi, sometime it may be failed due to conflict with other packages.

You could create a new Laravel project and install the migrations generator to make sure it is working at your local.