vendredi 17 novembre 2017

Composer install on production throws Service Provider not found

I am developing an app using Laravel 5.5

What I've done in development environment:

  1. Run composer require [spatie/laravel-permission](http://ift.tt/1OigRca)
  2. Added this Service Provider in config/app.php: 'providers' => [Spatie\Permission\PermissionServiceProvider::class,];

If I had the Service Provider registered before to install spatie/laravel-permission, then I guess I'd get the error "Service Provider" not found. That's what happened on production, because the app had the Service Provider already registered when I deployed it to production, so the deploy fails when running composer install.

The error:

Script - scripts/deploylaravel.sh  
[stdout]  [Symfony\\\\Component\\\\Debug\\\\Exception\\\\FatalThrowableError]        
[stdout]  Class 'Spatie\\\\Permission\\\\PermissionServiceProvider' not found

How to avoid this error?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2j2HXZy
via IFTTT

Aucun commentaire:

Enregistrer un commentaire