Alright, I figure out the course of this error. In case you encounter this error, there is a possibility that you are using MarketPlace extension from bagisto.
What you have to do is to go marketplace -> src -> poviders -> marketplaceserviceprovider.php Inside you will see $this->app->register(ModuleServiceProvider::class); and $this->app->register(EventServiceProvider::class);
Then wrap it inside if statement like this...
public function __contruct()
{
$this->channel = Channel::all();
}
if (isset($this->channel))
{
$this->app->register(ModuleServiceProvider::class);
$this->app->register(EventServiceProvider::class);
}
===============================================
To produce this error, setup a fresh nagisto and configure marketplace extension at once before runing migration.