Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

Tags:

laravel-5.4

Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 0 installs, 0 updates, 1 removal - Removing genealabs/laravel-caffeine (0.3.12) Writing lock file Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover

[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'GeneaLabs\LaravelCaffeine\LaravelCaffeineServiceProvider' not found

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

like image 941
Pred Avatar asked Oct 28 '17 03:10

Pred


People also ask

What is PHP artisan dump-autoload?

If you need to regenerate your package's autoload files, you may use the php artisan dump-autoload command. This command will regenerate the autoload files for your root project, as well as any workbenches you have created.

What is composer dump-autoload?

composer dump-autoload. php artisan dump-autoload. It regenerates the list of all the classes that need to be included in the project (autoload_classmap. php). It will 'recompile' loads of files creating the huge bootstrap/compiled.php.

What is PHP artisan serve in laravel?

The Laravel PHP artisan serve command helps running applications on the PHP development server. As a developer, you can use Laravel artisan serve to develop and test various functions within the application. It also accepts two additional options. You can use the host for changing application's address and port.


3 Answers

I simply ran composer update and it resolved my issue - Laravel 6.*

like image 129
BE KNOW DO Avatar answered Oct 17 '22 13:10

BE KNOW DO


Add this in composer.json. Then dusk has to be installed explicitly in your project:

"extra": {
    "laravel": {
        "dont-discover": [
            "laravel/dusk"
        ]
    }
},

I found this solution here

like image 33
Abed Bilani Avatar answered Oct 17 '22 11:10

Abed Bilani


In case you're coming from a google search, make sure that you have a .env file in which APP_ENV is set to local. (if you cloned a project from github, the first thing is to run cp .env.example .env. That was actually the problem in my case)

Then run composer install again.

like image 19
Itope84 Avatar answered Oct 17 '22 13:10

Itope84