DIContainer could not get service: No arguments were given!
See original GitHub issueI’m getting error
DIContainer could not get service: No arguments were given!when register service
container.registerSingleton<ORMAdapter, PrismaAdapter>();
In source code there is
if (options == null) throw new ReferenceError(
${this.constructor.name} could not get service: No arguments were given!);
But I can’t found info about required options argument.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Swinject/DIContainer.md at master - GitHub
Registration with Arguments in a DI Container. The factory closure passed to the register method can take arguments that are passed when the...
Read more >ASP.NET Core Dependency Injection with Multiple Constructors
InvalidOperationException: Multiple constructors accepting all given argument types have been found in type 'MyNameSpace.MyTagHelper'. There should only be one ...
Read more >Dependency injection guidelines - .NET | Microsoft Learn
Learn various dependency injection guidelines and best practices for .NET application development.
Read more >Activator utilities: activate anything! - On The Drift
Examples given in this post are available on Github ... the DI container would not be able to know anything about the lifetime...
Read more >Services and dependency injection in Drupal 8+
The best practice for these is not to call out to the global service container and instead pass in the required services as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cmidgley must be something with the dev machine. Thanks!
Hi there. @cmidgley, thanks for your excellent help here. @olegKusov, please refer to the suggestions by @cmidgley here, as well as the documentation for setting up DI-compiler.
I’m going to close this issue, but feel free to reach out again if you have any additional problems.