Coder Social home page Coder Social logo

sveltekitpwa's People

Contributors

funmiles avatar userquin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sveltekitpwa's Issues

Cannot register service worker TypeError: `Failed to register a ServiceWorker`

Hello again.

Last June/July I merged your repo into a new one, which worked across the board in Lighthouse: 100%.

So, vis-ร -vis the current problem, I've merged the repo again using SvelteKit Version 1 (npm create svelte@latest my-app), and it works, but I get: Cannot register service worker TypeError in Chrome devtools.

Here's my progress:

What to look for in devtools:

cannot register service worker TypeError: Failed to register a ServiceWorker for scope ('https://lowenergy.vercel.app/') with script ('https://lowenergy.vercel.app/service-worker.js'): ServiceWorker script evaluation failed

&

cannot register service worker TypeError: Failed to register a ServiceWorker for scope ('https://lowenergy.vercel.app/') with script ('https://lowenergy.vercel.app/service-worker.js'): ServiceWorker script evaluation failed

&

cannot register service worker DOMException: Failed to register a ServiceWorker for scope ('https://lowenergy.vercel.app/') with script ('https://lowenergy.vercel.app/service-worker.js'): Operation has been aborted

It's not clear exactly HOW to register this?

Auditing with Lighthouse (Chrome Dev tools), throws `Failed to register...`, but works elsewhere.

Thank you for writing this straight forward ServiceWorker, I've tested many, but yours is stable and working OOTB! ๐Ÿ™‚

Issue: End-to-end testing works on desktop and mobile, offline โ€“ but auditing with Lighthouse (Chrome Dev tools), throws:

cannot register service worker DOMException: Failed to register a ServiceWorker for scope ('https://offline-phi.vercel.app/') with script ('https://offline-phi.vercel.app/service-worker.js'): Operation has been aborted

This app can not get past ~80% and takes a long time to cancel the audit in Chrome Dev tools, Lighthouse.

Do you have any suggestions? It'd be useful to be able to speed test the template before adding content.

Updating Sveltekit/Vite now throws: `request in handle has been replaced with event. See https://github.com/sveltejs/kit/pull/3384 for details`

I am trying to use SveltekitPWA with the Vite/Svelte inspector, which is available using an entry to svelte.config.js:

/** @type {import('@sveltejs/kit').Config} */
const config = {
  experimental: { inspector: true },
...

However, merging SveltekitPWA with the latest Sveltekit, highlights breaking changes โ€“ notably: hooks.ts throws: sveltejs/kit#3384.

Have you had a chance to look at the new interface?

Repo: https://github.com/inspiredlabs/inspector
demo: https://offline-phi.vercel.app

How to enable debug logging?

Hi

Is there a way how to enable debug logging? As you don't have the "workbox" object available in your service worker I don't see an option how to set workbox.setConfig({ debug: true });

Thanks in advance

Typescript & updated package errors

Error: $page.path has been replaced by $page.url.pathname
src/lib/Header/index.svelte (18, 19, 20)

Error: request.query has been replaced by request.url.searchParams
src/hooks.ts (10, 11)

Could not find a declaration file for module 'cookie'. ts(7016)
src/hooks.ts (1)

Property 'render' does not exist on type '{ request: ServerRequest<Record<string, any>, unknown>; resolve(request: ServerRequest<Record<string, any>, unknown>): MaybePromise<ServerResponse>; }'. ts(2339)
src/hooks.ts (5, 14)

Object is possibly 'null'. ts(2531)
src/hooks.ts (11)

Binding element 'url' implicitly has an 'any' type. ts(7031)
src/service-worker.ts (43)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.