-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't resolve HttpService #65
Comments
Attempted to fix it by adding this on my Module imports - didnt help. ClsModule.forFeatureAsync( I get this error Cannot create a Proxy provider for HttpService. The class must be explicitly decorated with the @InjectableProxy() decorator to distinguish it from a regular provider. |
Tried this as well, since the RequestScopedService is what has the dependency on HttpService ClsModule.forFeatureAsync( I get this error Cannot create Proxy provider RequestScopedService (?, RequestHelper). The argument HttpService at index [0] was not found in the ClsModule Context. Potential solutions: |
I believe HttpModule is dynamic, do you need to put HttpModule.register() in the imports. If that does not help, please provide a minimal repoducible example, so I can investigate. EDIT: actually HttpModule can be used also with a static import, so this should actually work 🤔 |
@justinpenguin45 Did you manage to solve your problem on your side, or do you require more assistance? |
I'm going to assume the issue is solved or no longer relevant, feel free to open a new one when problems arise. |
I have a service which has a dependency on HttpService from nestjs HttpModule. This was working fine and being injected until I gave the class the @InjectableProxy attribute. Now I get this error
Cannot create Proxy provider RequestScopedService (?, RequestHelper). The argument HttpService at index [0] was not found in the ClsModule Context.
Potential solutions:
- If HttpService is a provider from a separate module, make sure to import the module in "ClsModule.forFeatureAsync()" registration
The text was updated successfully, but these errors were encountered: