NPM Version: 8.1.4
Encountered Issue:
Error: Uncaught (in promise): Error: Error in ./SignupComponent class SignupComponent_Host - inline template:0:0 caused by: No provider for Http!
Error: No provider for Http!
The error message usually indicates the absence of a HttpModule somewhere in the application, but I have already globally provided it in app.module.
This error occurs when importing a service that utilizes the Http class within its constructor into my component.
In my app.module class, I import and provide the HttpModule at the global level:
*Code Snippet*
Within my authentication.service, I import Http from the HttpModule and utilize it in the service logic:
*Code Snippet*
Lastly, in my signup.component, the user form interacts with the authentication.service to register a user:
*Code Snippet*
When I exclude the authentication.service from this component, everything works as expected. So, the issue does not seem to be related to the absence of HttpModule since it is provided in my app.module; it appears to be something else that I am unable to pinpoint.
Additionally, I receive a warning during npm run build
regarding the Http module, but I am unsure of its significance:
*Warning Message*
Thank you for your assistance.