NullInjectorError: No provider for SwUpdate! SwUpdate does not work Angular 5
Now I know there are a million posts about No Provider for such and such service, I know it needs to go in the providers please read my entire post. Basically I am trying to use SwUpdate to check to see if there is an update if so, refresh the browser: import { SwUpdate } from '@angular/service-worker'; ... export class ... constructor( private _swUp: SwUpdate ){} ngOnInit() { this.checkForUpdate(); } checkForUpdate() { if (this._swUp.isEnabled) { this._swUp.available .subscribe(() => { window.location.reload(); }); } } now I have registered my serviceworker: import { ServiceWorkerModule }