Open Dilden opened 1 year ago
grep -rl _layout.d7168494.css
returns the following files which are calling for this "missing file" (the file does exist)
.svelte-kit/cloudflare/sw.js .svelte-kit/output/client/sw.js .svelte-kit/output/server/.vite/manifest.json
Seems like it could be an issue with the Vite-PWA plugin.
This might have been fixed, I don't see any errors when running tests on my end.
Nah, it's still there. Try running npm run dev
to see it happen in the dev server or npm run test
to watch it happen with the Integration tests. Unit tests don't need to run a server which is why it wouldn't happen there.
This is all I see when I run npm run dev
:
npm run test
has a different error when I run it:
npm run dev
, do you see the errors after navigating around the app?npm run test
error you're seeing is one I have not encountered at all yet. Are all dependencies installed?npm install
before npm run test
and got the same result. I'll figure it out, though.Do I need an .env file?
And what Node version are you using?
Ok, I resolved the error in npm run test
by updating to the latest LTS version of Node. I was on 20.6.x and I updated to 20.11.x. See: https://github.com/microsoft/playwright/issues/29253#issuecomment-1919137434
I have now upgraded Node via nvm
and attempted to remove all Playwright browsers with npx playwright uninstall
and reinstall via npx playwright install
. I've also cleared the browser cache and I believe this is probably some combination of caching + Vite PWA as it now only refers to /workbox-xxxxxxx.js
being Not found in the dev
mode. Output shown below:
Testing still throws errors about files not shown as well.
I'm inclined to believe the cache isn't being invalidated in both dev and test.
Deleting /dev-dist/
and re-running npm run dev
clears this error in dev mode. It still remains in tests though.
This error shows up during tests. By setting
prerender = false;
insrc/+layout.js
, the error will go away but then a new error is shown from the Vite PWA plugin/workbox config.Besides, the app should be prerenderable except for the one endpoint (src/routes/api/upc/+server.js).That endpoint has since been removed.