Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Not found: /server/_app/immutable/assets/_layout.d7168494.css #124

Open
Dilden opened this issue Oct 12, 2023 · 11 comments
Open

Error: Not found: /server/_app/immutable/assets/_layout.d7168494.css #124

Dilden opened this issue Oct 12, 2023 · 11 comments
Labels
dx Speed up or improvement development experience

Comments

@Dilden
Copy link
Owner

Dilden commented Oct 12, 2023

This error shows up during tests. By setting prerender = false; in src/+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.

@Dilden
Copy link
Owner Author

Dilden commented Oct 12, 2023

@Dilden
Copy link
Owner Author

Dilden commented Nov 10, 2023

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.

@Dilden Dilden added the dx Speed up or improvement development experience label Dec 11, 2023
@jimmyhogoboom
Copy link
Collaborator

This might have been fixed, I don't see any errors when running tests on my end.

@Dilden
Copy link
Owner Author

Dilden commented Mar 11, 2024

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.

@jimmyhogoboom
Copy link
Collaborator

This is all I see when I run npm run dev:
image

npm run test has a different error when I run it:
image

@Dilden
Copy link
Owner Author

Dilden commented Mar 11, 2024

  1. With npm run dev, do you see the errors after navigating around the app?
  2. The npm run test error you're seeing is one I have not encountered at all yet. Are all dependencies installed?

@jimmyhogoboom
Copy link
Collaborator

  1. My first screenshot was taken after navigating around the app. I tried again to verify, I see the same thing even after visiting every page.
  2. I tried another npm install before npm run test and got the same result. I'll figure it out, though.

Do I need an .env file?

@jimmyhogoboom
Copy link
Collaborator

And what Node version are you using?

@jimmyhogoboom
Copy link
Collaborator

jimmyhogoboom commented Mar 11, 2024

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: microsoft/playwright#29253 (comment)

@Dilden
Copy link
Owner Author

Dilden commented Mar 14, 2024

  1. You shouldn't need a .env file for this branch (there is a branch that will but we're not there yet).
  2. Was using Node v20.10 but have upgraded now to v20.11.1. I'm all for using the latest LTS.

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:
image

Testing still throws errors about files not shown as well.
image

I'm inclined to believe the cache isn't being invalidated in both dev and test.

@Dilden
Copy link
Owner Author

Dilden commented Mar 14, 2024

Deleting /dev-dist/ and re-running npm run dev clears this error in dev mode. It still remains in tests though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Speed up or improvement development experience
Projects
None yet
Development

No branches or pull requests

2 participants