question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to load sw.js

See original GitHub issue

With the new build folder structure the service-workerjs file is located in a hashed subfolder as shown in the image below.

image

However it appears that the choo-service-worker service:

  app.use(require('choo-service-worker')())

is looking for /sw.js at the root of the dist directory.

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yoshuawuytscommented, Sep 21, 2017

Fixed in 633112e 😁

1reaction
yoshuawuytscommented, Sep 21, 2017

I think the right way to approach this is to remember if there’s a service-worker.js file or a sw.js file, and output the right one. I kinda changed my mind, and like service-worker better, so we might change it up in choo-service-worker at some point, but both approaches should be equally valid for bankai. Good catch! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service worker errors when restarted only in chrome: Failed to ...
On Chrome, the below test service worker install fines, works perfectly until one closes and opens the browser, or in the SW dev...
Read more >
Getting error 404 for `/service-worker.js` since 1.0.0-next.207
Run npm run build and npm run preview , open the website, and look at the console. Logs. [Error] Failed to load resource:...
Read more >
ServiceWorkerContainer.register() - Web APIs | MDN
The loaded service worker is in an ES module and the import statement is available on worker contexts. updateViaCache. A string indicating how ......
Read more >
Angular Service Worker - Step-By-Step Guide
An unknown error occurred when fetching the script. ngsw-worker.js Failed to load resource: net::ERR_CONNECTION_REFUSED.
Read more >
Service-worker redirection 403 - support - Discourse Meta
Hi, we are using Bunny CDN and see that error after last update (own ... at 'https://CDN/javascripts/workbox/workbox-sw.js' failed to load.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found