I\'ve been trying to switch my app over to AoT compilation and have been getting this error in the production environment when the app is loading (it works fine locally).
Worked for me when I used following while importing the Service in app.module.ts
{provide: AuthService, depends: HttpClientModule}