laravel 未找到类“SocialiteProviders\Manager\ServiceProvider”

pcrecxhr  于 2023-11-20  发布在  其他
关注(0)|答案(2)|浏览(137)

File:Composer.json

{
        "name": "laravel/laravel",
        "description": "The Laravel Framework.",
        "keywords": ["framework", "laravel"],
        "license": "MIT",
        "type": "project",
        "require": {
            "php": ">=7.0.0",
            "barryvdh/laravel-debugbar": "^3.0",
            "creativeorange/gravatar": "~1.0",
            "doctrine/dbal": "^2.5",
            "fideloper/proxy": "~3.3",
            "google/recaptcha": "^1.1",
            "intervention/image": "^2.4",
            "jaybizzle/laravel-crawler-detect": "1.*",
            "jeremykenedy/laravel-exception-notifier": "^1.1",
            "jeremykenedy/laravel-https": "^1.1",
            "jeremykenedy/laravel-logger": "^1.0.1",
            "jeremykenedy/laravel-roles": "^1.1",
            "jeremykenedy/laravel2step": "^1.0.2",
            "jeremykenedy/uuid": "^3.1",
            "laravel/framework": "5.5.*",
            "laravel/socialite": "^3.0",
            "laravel/tinker": "~1.0",
            "laravelcollective/html": "^5.5",
            "pusher/pusher-php-server": "^3.0",
            "rap2hpoutre/laravel-log-viewer": "^0.10.4",
            "socialiteproviders/37signals": "^3.0",
            "socialiteproviders/generators": "^2.0",
            "socialiteproviders/instagram": "^3.0",
            "socialiteproviders/twitch": "^3.0",
            "socialiteproviders/youtube": "^3.0"
        },
    }

字符串
//文件app.php -

'providers' => [
        SocialiteProviders\Manager\ServiceProvider::class,
        SocialiteProviders\Generators\GeneratorsServiceProvider::class,
  ],
  'aliases' => [
        'Socialite'    => Laravel\Socialite\Facades\Socialite::class,
  ]


我不知道为什么它不是根链接:https://github.com/SocialiteProviders/Manager

u5rb5r59

u5rb5r591#

这个问题在 composer 自动加载被卡住时很常见。
composer dump-autoloadphp artisan clear-compiled可以解决这个问题,但有时并不能。
解决这个问题的方法是删除文件/bootstrap/cache/packages.php/bootstrap/cache/services.php,然后运行composer update

z8dt9xmd

z8dt9xmd2#

config/app.php中删除以下行:

SocialiteProviders\Manager\ServiceProvider::class,
SocialiteProviders\Generators\GeneratorsServiceProvider::class,
'Socialite' => Laravel\Socialite\Facades\Socialite::class,

字符串
然后运行这些命令:

composer install
composer du


然后将所有三条线放回config/app.php

相关问题