没有不值得去解决的问题,也没有不值得去学习的技术!

执行 php artisan config:clear 时,报错:ErrorException : include(E:\wwwroot\object\vendor\composer/../../Modules/ThemeStoreGraphQL/Providers/GraphQlResolverServiceProvider.php): failed to open stream: No such file or directory

执行 php artisan config:clear 时,报错:ErrorException : include(E:\wwwroot\object\vendor\composer/../../Modules/ThemeStoreGraphQL/Providers/GraphQlResolverServiceProvider.php): failed to open stream: No such file or directory
1、执行 php artisan config:clear 时,报错:ErrorException : include(E:\wwwroot\object\vendor\composer/../../Modules/ThemeStoreGraphQL/Providers/GraphQlResolverServiceProvider.php): failed to open stream: No such file or directory。如图1
执行 php artisan config:clear 时,报错:ErrorException  : include(E:\wwwroot\object\vendor\composer/../../Modules/ThemeStoreGraphQL/Providers/GraphQlResolverServiceProvider.php): failed to open stream: No such file or directory
图1


PS E:\wwwroot\object> php artisan config:clear

   ErrorException  : include(E:\wwwroot\object\vendor\composer/../../Modules/ThemeStoreGraphQL/Providers/GraphQlResolverServiceProvider.php): failed to open stream: No such file or directory

  at E:\wwwroot\object\vendor\composer\ClassLoader.php:571
    567|  * @private
    568|  */
    569| function includeFile($file)
    570| {
  > 571|     include $file;
    572| }
    573|

  Exception trace:

  1   include()
      E:\wwwroot\object\vendor\composer\ClassLoader.php:571

  2   Composer\Autoload\includeFile("E:\wwwroot\object\vendor\composer/../../Modules/ThemeStoreGraphQL/Providers/GraphQlResolverServiceProvider.php")
      E:\wwwroot\object\vendor\composer\ClassLoader.php:428

  Please use the argument -v to see more details.


2、确认文件 Modules/ThemeStoreGraphQL/Providers/GraphQlResolverServiceProvider.php 已经不存在,被重命名为:Modules/OnlineStoreThemeGraphQL/Providers/GraphQlResolverServiceProvider.php 3、执行:composer install 命令,以重新生成 vendor\composer\ClassLoader.php。报错:In ProviderRepository.php line 208: Class ‘Modules\ThemeStoreGraphQL\Providers\GraphQlResolverServiceProvider’ not found Script @php artisan package:discover –ansi handling the post-autoload-dump event returned with error code 1。如图2
执行:composer install 命令,以重新生成 vendor\composer\ClassLoader.php。报错:In ProviderRepository.php line 208: Class 'Modules\ThemeStoreGraphQL\Providers\GraphQlResolverServiceProvider' not found Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
图2


PS E:\wwwroot\object> composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 29 updates, 0 removals
  ...
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In ProviderRepository.php line 208:

  Class 'Modules\ThemeStoreGraphQL\Providers\GraphQlResolverServiceProvider' not
  found


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


4、原因在于 /config/app.php 的 providers 中包含:\Modules\ThemeStoreGraphQL\Providers\GraphQlResolverServiceProvider::class, 5、再次执行:composer install、php artisan config:clear,皆运行成功。


PS E:\wwwroot\object> composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
...
Package manifest generated successfully.
111 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PS E:\wwwroot\object> php artisan config:clear
Configuration cache cleared!


   

PHP / Laravel / Yii2 老项目维护与长期技术支持

如果你的 PHP / Laravel / Yii2 项目已经上线,但遇到原开发离职、Bug 长期无人修复、接口不稳定、性能下降、代码难以接手等问题,可以联系我做一次远程技术排查。

适合以下情况:
✅ 老旧 PHP 系统无人维护
✅ Laravel / Yii2 项目 Bug 修复
✅ 后台管理系统小功能迭代
✅ RESTful API 接口排查
✅ MySQL / Redis / Nginx 性能问题
✅ 长期远程兼职维护

可先从一次小问题开始:
✅ 线上报错排查
✅ 接口异常分析
✅ 慢查询与性能瓶颈定位
✅ 代码结构初步评估
✅ 部署环境与日志检查

如需咨询,请联系我,并注明:PHP 维护咨询

联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理