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

"component.css is undefined" on fresh install #1256

@Pierstoval

Description

@Pierstoval

Describe the bug

After a fresh install, running the server outputs this in the browser:

image

Logs

List of commands to reproduce
$ node --version
v14.4.0
$ npm --version
6.14.5
$ npx degit "sveltejs/sapper-template#rollup" sapper_test
npx : 1 installé(s) en 1.633s
> cloned sveltejs/sapper-template#rollup to sapper_test
$ cd sapper_test
$ npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\rollup\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN TODO@0.0.1 No repository field.
npm WARN TODO@0.0.1 No license field.

added 272 packages from 182 contributors and audited 274 packages in 26.177s

19 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
$ npm run dev

> TODO@0.0.1 dev e:\dev\www\sapper_test
> sapper dev

✔ server (1.2s)
✔ client (1.2s)
✔ service worker (26ms)
> Listening on http://localhost:3000

I tested this on Node 12, installed Node 14 to check if I was not outdated just in case, and it doesn't work anymore.

Stacktraces

Stack trace in the browser
load_component@http://localhost:3000/client/client.06dea69b.js:2088:20
hydrate_target/branch<@http://localhost:3000/client/client.06dea69b.js:2039:50
hydrate_target@http://localhost:3000/client/client.06dea69b.js:2023:42
navigate@http://localhost:3000/client/client.06dea69b.js:1889:3
start/<@http://localhost:3000/client/client.06dea69b.js:2148:22

Information about your Sapper Installation:

  • Firefox 77.0.1 (64 bits)
  • Windows 10
  • Sapper version 0.27.13
  • Svelte version 3.23.0
  • With Rollup

Severity

High (project unusable)

Additionnal context

The home page is actually displayed in the first place, but the error replaces the entire page after a blink of an eye, so this definitely comes from the client.

As you can see on the following screenshot (click to unroll), adding a debugging breakpoint in the devtools shows that the project's web page is well rendered in the first place, but somehow there are issues with the component variable, for which the CSS is not rendered.
I'm not sure but maybe the frontend compiler isn't capable of rendering the CSS. I don't know if it's a Sapper or Svelte issue, though.

Breakpoint screenshot

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions