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

ILUMINATE\Contracts\Container\BindingResolutionException : Target[Modules\ThemeStore\View\ViewStorageInterface]Is not instantiable while building[Modules\ThemeStore\Resolver\OnlineStoreThemeResolver].

Lighthouse 大量使用 SDL 并利用模式指令。为了改善您的编辑体验,您可以使用 artisan 命令生成定义文件。报错:Illuminate\Contracts\Container\BindingResolutionException : Target [Modules\ThemeStore\View\ViewStorageInterface] is not instantiable while building [Modules\ThemeStore\Resolver\OnlineStoreThemeResolver].

1. Lighthouse uses a lot of SDL and uses mode instructions. In order to improve your editing experience, you can use the artisan command to generate a definition file. Error: Illuminate\Contracts\Container\BindingResolutionException : target[Modules\ThemeStore\View\ViewStorageInterface]Is not instantiable while building[Modules\ThemeStore\Resolver\OnlineStoreThemeResolver]. as shown in Figure 1

Lighthouse 大量使用 SDL 并利用模式指令。为了改善您的编辑体验,您可以使用 artisan 命令生成定义文件。报错:Illuminate\Contracts\Container\BindingResolutionException  : Target [Modules\ThemeStore\View\ViewStorageInterface] is not instantiable while building [Modules\ThemeStore\Resolver\OnlineStoreThemeResolver].
Figure 1

PS E:\wwwroot\object> php artisan lighthouse:ide-helper
Wrote schema directive definitions to E:\wwwroot\object/schema-directives.graphql.

   Illuminate\Contracts\Container\BindingResolutionException  : Target [Modules\ThemeStore\View\ViewStorageInterface] is not instantiable while building [Modules\ThemeStore\Resolver\OnlineStoreThemeResolver].

  at E:\wwwroot\object\vendor\laravel\framework\src\Illuminate\Container\Container.php:978
    974|         } else {
    975|             $message = "Target [$concrete] is not instantiable.";
    976|         }
    977|
  > 978|         throw new BindingResolutionException($message);
    979|     }
    980|
    981|     /**
    982|      * Throw an exception for an unresolvable primitive.

  Exception trace:


2. Execute the command: php artisan module:list to display a list of all modules. Confirm that the module Themestore is disabled. as shown in Figure 2

执行命令:php artisan module:list,显示所有模块的列表。确认模块 ThemeStore 已禁用
Figure 2

PS E:\wwwroot\object> php artisan module:list
+-----------------------+----------+-------+---------------------------------------------------------+
| Name                  | Status   | Order | Path                                                    |
+-----------------------+----------+-------+---------------------------------------------------------+
| ThemeStore            | Disabled | 0     | E:\wwwroot\object\Modules/ThemeStore            |


3. After enabling the module ThemeStore, the same error is still reported


PS E:\wwwroot\object> php artisan module:enable ThemeStore
Module [ThemeStore] enabled successful.
PS E:\wwwroot\object> php artisan lighthouse:ide-helper
Wrote schema directive definitions to E:\wwwroot\object/schema-directives.graphql.

   Illuminate\Contracts\Container\BindingResolutionException  : Target [Modules\ThemeStore\View\ViewStorageInterface] is not instantiable while building [Modules\ThemeStore\Resolver\OnlineStoreThemeResolver].

  at E:\wwwroot\object\vendor\laravel\framework\src\Illuminate\Container\Container.php:978
    974|         } else {
    975|             $message = "Target [$concrete] is not instantiable.";
    976|         }
    977|
  > 978|         throw new BindingResolutionException($message);
    979|     }
    980|
    981|     /**
    982|      * Throw an exception for an unresolvable primitive.

  Exception trace:


4. Finally found that the reason is that Modules\ThemeStore\Providers\ThemeStoreServiceProvider::Class in the Providers of config/app.php has been annotated. Missing service provider classes. Uncomment, no more errors.


PS E:\wwwroot\object> php artisan lighthouse:ide-helper
Wrote schema directive definitions to E:\wwwroot\object/schema-directives.graphql.
Wrote definitions for programmatically registered types to E:\wwwroot\object/programmatic-types.graphql.
Wrote PHP definitions to E:\wwwroot\object/_lighthouse_ide_helper.php.

It is recommended to add them to your .gitignore file.


 

需要长期技术维护或远程问题排查?

我是拥有 15+ 年经验的 PHP / Go 后端工程师,长期关注已有系统维护、Bug 修复、性能优化、服务器排查、WordPress 网站维护和小功能迭代。

如果你的项目遇到以下情况,可以先从一次小问题排查开始合作:

  • ✅ PHP / Laravel / Yii2 老项目无人维护
  • ✅ Go / Gin 后端接口需要排查或优化
  • ✅ WordPress 网站访问慢、报错或插件冲突
  • ✅ Nginx / MySQL / Redis / Linux 服务器异常
  • ✅ CDN / Cloudflare / DNS / HTTPS 配置问题
  • ✅ 需要长期远程技术支持或兼职维护

更多介绍请查看:关于我 & 合作

微信:13980074657
邮箱:shuijingwanwq@gmail.com
Telegram:@shuijingwan
GitHub:https://github.com/shuijingwan

评论

发表回复

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

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