-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Failed to register a ServiceWorker for scope #1
Comments
michalslime
pushed a commit
to michalslime/angular-pwa-gtv
that referenced
this issue
Jan 23, 2024
michalslime
pushed a commit
to michalslime/angular-pwa-gtv
that referenced
this issue
Jan 23, 2024
michalslime
pushed a commit
to michalslime/angular-pwa-gtv
that referenced
this issue
Jan 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does running this project simply by 'ng serve' do activate the service worker and consequently the SWUpdate?
I believe not, because default configuration is development and not production. So I can't understand how can you present screens of update.
Even when I change default to production or run 'ng serve -c production', it tries to activate the service worker but it doesn't work well.
It gives me this error:
main.js:1 Service worker registration failed with: TypeError: Failed to register a ServiceWorker for scope ('http://localhost:4200/') with script ('http://localhost:4200/ngsw-worker.js'): A bad HTTP response code (404) was received when fetching the script.
I think you can't run a PWA with service worker using 'ng serve'. One must build and run the application in a server like iis or http-server.
The text was updated successfully, but these errors were encountered: