laravel版本:7.24.0
os:windows
我在命令提示符下运行以下命令。composer require laravel/socialite
但它失败了,输出为:
D:...xxx>composer require laravel/socialite
Using version ^4.4 for laravel/socialite
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing league/oauth1-client (1.7.0): Loading from cache
- Installing laravel/socialite (v4.4.1): Loading from cache
Writing lock file
Generating optimized autoload files
> IlluminateFoundationComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In ProviderRepository.php line 208:
Class 'LaravelSocialiteSocialiteServiceProvider' not found
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
我试过转储自动加载和清除配置,但任何事情都对我没有帮助
由于未真正安装socialite
程序包,因此发生错误。我检查了vender/laravel
目录,但没有安装socialite
。composer
尝试下载socialite
程序包,但失败。但是composer
忽略了socialite
包的失败,所以在composer
命令完成后,他们找不到Class 'LaravelSocialiteSocialiteServiceProvider'
。我不知道为什么要下载socialite
包,但我认为主要是网络问题(速度慢或ip位置受阻等(。因此,我通过将socialite
包复制到vendor
目录来解决问题。