Skip to content

no css on error page after building #715

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

Closed
elianiva opened this issue Mar 27, 2021 · 3 comments · Fixed by #882
Closed

no css on error page after building #715

elianiva opened this issue Mar 27, 2021 · 3 comments · Fixed by #882
Labels
bug Something isn't working
Milestone

Comments

@elianiva
Copy link

Describe the bug

The error page doesn't seem to load any CSS or even request it.

Logs

There is no log, it just says route is not found which is expected, though I have a screencast for it.

This first screencast is when running sveltekit on development. The CSS doesn't seem to load initially but it comes back after maybe several ms. It's like vite put the css back (there's a message in the console, though I don't really understand how Vite works)

something.mp4

This second one is after running svelte-kit build. The CSS doesn't seem to load at all and there's no network request either.

something2.mp4

2021-03-27T06:46:54,198945491+07:00

To Reproduce

I've made a repo to reproduce this issue. https://github.com/elianiva/repro

  1. install deps
  2. run npm run build
  3. go to a non-existent route
  4. the CSS isn't there

or

  1. install deps
  2. run npm run dev
  3. go to a non-existent route
  4. the CSS is there

Expected behavior

The CSS should be there even if it's a production build

Stacktraces

none

Information about your SvelteKit Installation:

  • The output of npx envinfo --system --npmPackages svelte,@sveltejs/kit --binaries --browsers
  System:
    OS: Linux 5.11 Arch Linux
    CPU: (4) x64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
    Memory: 4.22 GB / 7.65 GB
    Container: Yes
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.12.0 - /tmp/fnm_multishell_2179_1616801221879/bin/node
    Yarn: 1.22.10 - /tmp/fnm_multishell_2179_1616801221879/bin/yarn
    npm: 7.6.3 - /tmp/fnm_multishell_2179_1616801221879/bin/npm
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.61 
    svelte: ^3.29.0 => 3.35.0 
  • Your browser

Mozilla Firefox 88.0b2

  • Your adapter (e.g. Node, static, Vercel, Begin, etc...)

adapter-static, but also happen on adapter-vercel

Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of SvelteKit entirely?

This is quite annoying because I'd like to have some styling on my error page. I could just redirect to / whenever a user hits an invalid route but that doesn't seem right.

Note: the more honest and specific you are here the more we will take you seriously.

Additional context
Add any other context about the problem here.

maybe related? #606
Thanks in advance :)

Rich-Harris added a commit that referenced this issue Apr 3, 2021
@Rich-Harris Rich-Harris added the bug Something isn't working label Apr 3, 2021
@Rich-Harris Rich-Harris added this to the 1.0 milestone Apr 3, 2021
@jfranciscosousa
Copy link

jfranciscosousa commented Apr 9, 2021

Can confirm that this is still happening. Just after creating an empty svelte-kit project. Seems that the entirety of %svelte.head% is missing on error pages

EDIT: Nevermind, my bad, guess these fixes haven't been released yet.

@benaltair
Copy link

For those who aren't seeing the fixes (this will be obvious to some) make sure to run npm update to get the latest Kit code.

@jfranciscosousa
Copy link

Can confirm that the new release works great

Rich-Harris added a commit that referenced this issue Apr 16, 2021
Rich-Harris pushed a commit that referenced this issue Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants