You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
TransactionalConnection can't be injected into middleware.
UnknownDependenciesException [Error]: Nest can't resolve dependencies of the ShopApiMiddleware (ConfigService, SessionService, ?). Please make sure that the argument TransactionalConnection at index [2] is available in the AppModule context.
Potential solutions:
- If TransactionalConnection is a provider, is it part of the current AppModule?
- If TransactionalConnection is exported from a separate @Module, is that module imported within AppModule?
@Module({
imports: [ /* the Module containing TransactionalConnection */ ]
})
To Reproduce
Steps to reproduce the behavior:
Create a class implementing NestMiddleware and inject TransactionalConnection in the contructor
Register the middleware and start the server
Expected behavior
TransactionalConnection should be available
Environment (please complete the following information):
@vendure/core version: 1.3.0
Additional context
A comment on that topic in slack
I think I know why this happens. It is due to an internal refractor where I put TransactionalConnection in its own module which is not being directly imported by AppModule.
The text was updated successfully, but these errors were encountered:
Describe the bug
TransactionalConnection can't be injected into middleware.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
TransactionalConnection should be available
Environment (please complete the following information):
Additional context
A comment on that topic in slack
The text was updated successfully, but these errors were encountered: