CSS file not found error
Describe the bug
This issue appears to resemble #9894 and #9923; however, it arises specifically within the Vercel environment. The problem occurs when a route contains two or more words with spaces between them. Notably, the issue manifests when prerendering is configured, whereas it has not been observed when utilizing server-side rendering (SSR) or client-side rendering (CSR).
Another observation is in the local preview mode, the first time I click any route with space, it shows a not found error. And works fine from the second click.
Reproduction
To demonstrate the issue, you can visit my practice application at https://learn-svelte-roan.vercel.app/Exercises. In the first route, "Adding data," where space exists, the CSS fails to load. On the other hand, the second route, "Assignment," without any spaces, function properly.
Source code link https://github.com/praful-hunde/learnSvelte
Logs
Vercel log-on error :
Error: Not found: /Exercises/_app/immutable/assets/2.0a66fb80.css
at resolve (file:///var/task/.svelte-kit/output/server/index.js:3509:18)
at resolve (file:///var/task/.svelte-kit/output/server/index.js:3384:34)
at #options.hooks.handle (file:///var/task/.svelte-kit/output/server/index.js:3554:61)
at respond (file:///var/task/.svelte-kit/output/server/index.js:3382:43)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
System Info
This is the local version, not from the Vercel environment. Don't know if I can run this for Vercel.
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz
Memory: 4.02 GB / 15.73 GB
Binaries:
Node: 16.17.1 - C:\Program Files\nodejs\node.EXE
npm: 8.10.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.51)
Internet Explorer: 11.0.19041.1566
npmPackages:
@sveltejs/adapter-auto: ^2.1.0 => 2.1.0
@sveltejs/kit: ^1.20.4 => 1.20.4
svelte: ^3.59.1 => 3.59.1
vite: ^4.3.9 => 4.3.9
Severity
annoyance
Additional Information
No response
Please provide a link to a minimal reproduction as requested in the issue template. A link to a deployed application without source is not a reproduction.
Please provide a link to a minimal reproduction as requested in the issue template. A link to a deployed application without source is not a reproduction.
Sorry, I missed the link to the source code. I added a link to github project with which I observed an error after hosting on Vercel with pre-rendering enabled. Although arguably it may not be called as bare minimal code.