Script @php artisan package:discover handling the

2020-02-23 07:01发布

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

标签: laravel-5.4
6条回答
Luminary・发光体
2楼-- · 2020-02-23 07:24

Check your code for errors in my case i had an error in Kernel.php. First solve errors if any Than run composer require ....(package you wish)

查看更多
Emotional °昔
3楼-- · 2020-02-23 07:25

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

查看更多
贪生不怕死
4楼-- · 2020-02-23 07:39

You have added the service provider in config/app.php for the package that is not installed in the system.

You must have this line in your config/app.php. You can either remove it or install the package GeneaLabs\LaravelCaffeine\LaravelCaffeineServiceProvider

See https://github.com/GeneaLabs/laravel-caffeine.

Run the line below via CLI to install the package.

 composer require genealabs/laravel-caffeine
查看更多
一夜七次
5楼-- · 2020-02-23 07:46

My problem was fideloper proxy version.

when i upgraded laravel 5.5 to 5.8 this happened

just sharing if anybody get help

change you composer json fideloper version:

"fideloper/proxy": "^4.0",

After that you need to run update composer that's it.

composer update
查看更多
霸刀☆藐视天下
6楼-- · 2020-02-23 07:47

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.

查看更多
疯言疯语
7楼-- · 2020-02-23 07:50

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

查看更多
登录 后发表回答