Error during service worker registration: DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html')
See original GitHub issueI created a new project using the pwa template, using vue-router in history mode, then i built it and served it using express
service worker works fine in all the routes like /home
or /help
excpet in nested routes…
Whenever i refresh my page when m on profile/dashboard
it gives error
Error during service worker registration: DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type (‘text/html’)
in my console
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Service Worker registration error: Unsupported MIME type ...
Error during service worker registration : DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html ...
Read more >Error: Service worker has an unsupported MIME type ('text ...
by the way, the mime type error happens before the service worker has a chance to register (or even load its module code)...
Read more >The script has an unsupported MIME type ('text/html')
I get following error: The script has an unsupported MIME type ('text/html'). service worker error DOMException: Failed to register a ...
Read more >ServiceWorker MIME Type Error ('text/html') on register (React)
The current behavior: Service worker does not register due to the below error. The expected behavior: Service worker registers. Details.
Read more >ServiceWorkerContainer.register() - Web APIs | MDN
The register() method of the ServiceWorkerContainer interface creates or updates a ServiceWorkerRegistration for the given scriptURL.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got the same problem. Can anyone help me?
i have the same issue, any idea?