deckgo / starter-kit

The developer kit to create slides with DeckDeckGo
https://deckdeckgo.com
MIT License
47 stars 13 forks source link

Service worker: Uncaught SyntaxError: Unexpected token < #33

Closed peterpeterparker closed 5 years ago

peterpeterparker commented 5 years ago

Sometimes after a redeploy, the error "Service worker: Uncaught SyntaxError: Unexpected token <" at runtime is catcher by Google Chrome

peterpeterparker commented 5 years ago

According https://github.com/vuejs-templates/pwa/issues/165 the problem might be the fact that there was no <base href="/" /> defined in the <head/>

I have added it to the starter and DeckDeckGo website too, I keep the issue open to have an eye on it

peterpeterparker commented 5 years ago

I opened an issue in Workbox https://github.com/GoogleChrome/workbox/issues/1902 and the awesome @jeffposnick provided the solution :)

peterpeterparker commented 5 years ago

@Dellos7 and @sansan88 you might be interested to reproduce the same commit in your presentation which are online and the rebuild and deploy them again, a really nice fix

Fix service worker refresh -> https://github.com/deckgo/deckdeckgo-starter/commit/456159e94039eaddb6f51b71a325eb69db250d41

VivekChoudhary128 commented 3 years ago

have a look at this too, seems like the problem was with the env, https://stackoverflow.com/questions/62521058/uncaught-syntaxerror-unexpected-token-when-using-create-react-app-develop-m you might first need to un-register the service by opening that web-app and going to application tab. follow this for it: https://stackoverflow.com/questions/33704791/how-do-i-uninstall-a-service-worker.

peterpeterparker commented 3 years ago

Thanks for the tips 👍