Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

On error, the returned _error.svelte page doesn't compile styles #1472

Closed
SamuelCharpentier opened this issue Sep 1, 2020 · 2 comments · Fixed by #1474
Closed

On error, the returned _error.svelte page doesn't compile styles #1472

SamuelCharpentier opened this issue Sep 1, 2020 · 2 comments · Fixed by #1474

Comments

@SamuelCharpentier
Copy link

Describe the bug

From the rollup template, when trying to access a page that doesn't exists, the 404 page that is returned contains no styling other than the global styling.

Logs

node.js logs:
✔ server (1.6s)
✔ client (1.6s)
✔ service worker (31ms)
> Listening on http://localhost:3000
Browser logs:
App> was created with unknown prop 'session' (anonymous) @ App.svelte:17
sapper-dev-client.js:21 [SAPPER] dev client connected

To Reproduce

In PowerShell
npx degit "sveltejs/sapper-template#rollup"
npm install
npm run dev
In Google Chrome
access http://localhost:3000/
make sure it works
access http://localhost:3000/not-a-real-page

Expected behavior

For the Nav.svelte and the _error.svelte to be rendered with their styles.

Information about your Sapper Installation:

Output of npx envinfo --system --npmPackages svelte,sapper,rollup,webpack --binaries --browsers
System:
OS: Windows 10 10.0.19041
CPU: (24) x64 AMD Ryzen Threadripper 1920X 12-Core Processor
Memory: 17.29 GB / 31.90 GB
Binaries:
Node: 12.16.0 - C:\Program Files\nodejs\node.EXE
npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 84.0.4147.135
Edge: Spartan (44.19041.423.0), Chromium (85.0.564.41)
Internet Explorer: 11.0.19041.1
npmPackages:
rollup: ^2.3.4 => 2.26.9
sapper: ^0.28.0 => 0.28.3
svelte: ^3.17.3 => 3.24.1

Browser
Google Chrome
Firefox

Hosting
Localhost

Severity
Annoying

@SamuelCharpentier SamuelCharpentier changed the title _error.svelte page doesn't compile styles On error, the returned _error.svelte page doesn't compile styles Sep 1, 2020
@aedeveloper
Copy link

  • same here _error.svelte styling does not work properly

Svelte: 3.24.1
Sapper: 0.28.3

@SamuelCharpentier
Copy link
Author

I was able to "resolve" the issue by removing my node_modules folder and changing "sapper": "^0.28.0" to "sapper": "0.28.0" in my package.json file before running a new npm install command.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants