0

When deploying lumen application with Codeship I get an error

[ErrorException]                                                             
  Missing argument 1 for Illuminate\Support\Manager::createDriver(), called i  
  n /home/rof/src/bitbucket.org/rakkle/rakkleapi/vendor/illuminate/support/Ma  
  nager.php on line 88 and defined 

It comes when the deployment runs the seeder class for the eloquent model associated.

I don't get this error on my local machine. In the bootstrap/app.php I have added

$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');
$app->configure('scout');

$app->register(Laravel\Scout\ScoutServiceProvider::class);
$app->register(ScoutEngines\Elasticsearch\ElasticsearchProvider::class);

Yes I am using a custom scout engine, which works perfect on my machine.

I have come to a point where I know it's laravel/scout package giving the problem because when I remove the Searchable trait from the eloquent class that's giving the problem, the deploy run successfully.

I would like some insight and some direction in solving this issue.

Thanks

Kelly J Andrews
  • 5,083
  • 1
  • 19
  • 32
Rudy Jessop
  • 872
  • 1
  • 11
  • 23

1 Answers1

0

I found a solution to this problem.

Here's the full error that I duplicated on my machine

ErrorException: Missing argument 1 for Illuminate\Support\Manager::createDriver(), called in /var/www/vendor/illuminate/support/Manager.php on line 88 and defined

    /var/www/vendor/illuminate/support/Manager.php:77
    /var/www/vendor/illuminate/support/Manager.php:88
    /var/www/vendor/illuminate/support/Manager.php:63
    /var/www/vendor/laravel/scout/src/EngineManager.php:21
    /var/www/vendor/laravel/scout/src/Searchable.php:203
    /var/www/vendor/laravel/scout/src/Searchable.php:56
    /var/www/vendor/laravel/scout/src/Searchable.php:35
    /var/www/vendor/illuminate/support/Traits/Macroable.php:78
    /var/www/vendor/laravel/scout/src/Searchable.php:112
    /var/www/vendor/laravel/scout/src/ModelObserver.php:61
    /var/www/vendor/illuminate/events/Dispatcher.php:367
    /var/www/vendor/illuminate/events/Dispatcher.php:199
    /var/www/vendor/illuminate/events/Dispatcher.php:172
    /var/www/vendor/illuminate/database/Eloquent/Concerns/HasEvents.php:148
    /var/www/vendor/illuminate/database/Eloquent/Model.php:670
    /var/www/vendor/illuminate/database/Eloquent/Model.php:518
    /var/www/vendor/illuminate/database/Eloquent/Builder.php:734
    /var/www/vendor/illuminate/support/helpers.php:936
    /var/www/vendor/illuminate/database/Eloquent/Builder.php:735
    /var/www/vendor/illuminate/database/Eloquent/Model.php:1357
    /var/www/vendor/illuminate/database/Eloquent/Model.php:1369
    /var/www/tests/PetListingTest.php:150
    /var/www/tests/PetListingTest.php:93

What I had forgot to add was within the environment variables in codeship was the SCOUT_DRIVER that I was using for the search. I had it within the .env file, reason why it wasn't giving me the issue on my machine.

Rudy Jessop
  • 872
  • 1
  • 11
  • 23