WorkboxError non-precached-url index.html
See original GitHub issueHi, thank you for this plugin.
I’m getting the error below when running the app with vite preview and in production. The app source code is available at https://github.com/jonian/awmonitor and the production link is https://awmonitor.netlify.app.
WorkboxError.js:28 Uncaught (in promise) non-precached-url: non-precached-url :: [{"url":"index.html"}]
at x.createHandlerBoundToURL (http://localhost:5000/workbox-a59a8da5.js:1:12967)
at Object.createHandlerBoundToURL (http://localhost:5000/workbox-a59a8da5.js:1:14597)
at http://localhost:5000/sw.js:1:10085
at http://localhost:5000/sw.js:1:695
s @ WorkboxError.js:28
createHandlerBoundToURL @ PrecacheController.js:276
(anonymous) @ createHandlerBoundToURL.js:29
(anonymous) @ sw.js:486
(anonymous) @ sw.js:1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
WorkboxError non-precached-url index.html #120 - GitHub
I'm getting the error below when running the app with vite preview and in production. The app source code is available at https://github.com/ ......
Read more >Correct way to precache the root url ("/") - Stack Overflow
If I use webpack-plugin-workbox to generate the precacheManifest, it doesn't include an entry for "/". "/index.html" is included of course. Now ...
Read more >Workbox - Chrome Developers
Introducing Workbox, a set of modules that simplify common service worker routing and ... Learn how to precache assets in a service worker...
Read more >workbox changelog
workbox -precaching will default to confirming that all Response s cached during installation have a non-error (less than 400 ) HTTP status code....
Read more >Static assets handling | Guide - Vite PWA - Netlify
If you're using PWA Manifest icons from any asset folder, but you are not ... error from your service worker: WorkboxError non-precached-url index.html....
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 Free
Top 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
Well, the problem is on your
workbox.globPatternsentry: you need to include all, it is exclusive, that is, if you include this entry, you MUST add all your patterns, not only font assets: in your case, you are not including js and css assets andindex.htmlpage.Since you are using
vite, all entries underassetsdirectory will be included, you don’t need to add them again.Just remove the
workboxentry from your configuration:You also need to add all red entries shown bellow to make it work offline, it is working, but some images missing:
I made a quick PR to update the type docs: https://github.com/GoogleChrome/workbox/pull/3106