sveltekit: example/sveltekit-ts doesn't preview on fresh clone (url not precahed)

I would expect the sample to work out of the box

Steps to reproduce

git clone https://github.com/vite-pwa/sveltekit.git
cd .\sveltekit\examples\sveltekit-ts\
npm install
npm install @vite-pwa/sveltekit -D
npm run build
npm run preview

Error

build warning

PWA v0.14.3
mode      injectManifest
precache  41 entries (861.89 KiB)
files generated
  .svelte-kit\output\client\prompt-sw.js
warnings
  One of the glob patterns doesn't match any files. Please remove or fix the following: {
  "globDirectory": ".svelte-kit/output",
  "globPattern": "prerendered/**/*.html",
  "globIgnores": [
    "**/node_modules/**/*",
    "client/prompt-sw.js",
    "client/prompt-sw.js"
  ]
}

appears in dev tools

Uncaught non-precached-url: createHandlerBoundToURL('/') was called, but that URL is not precached. Please pass in a URL that is precached instead.
    at PrecacheController.createHandlerBoundToURL (http://localhost:4173/prompt-sw.js:1493:13)
    at createHandlerBoundToURL (http://localhost:4173/prompt-sw.js:2079:30)
    at http://localhost:4173/prompt-sw.js:2176:3

Node : 18.7.0 OS : win32 x64 npm : 8.16.0

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

@GaryB432 I cannot reproduce your warning, SvelteKit do 2 builds, your warning can be shown when building the client, since SvelteKit prerender process has not yet run, and so, prerendered folder missing: check this response https://github.com/vite-pwa/sveltekit/issues/27#issuecomment-1420550146

@GaryB432 I Will check it tmr