question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spurious prop warnings with `+page.svelte` files

See original GitHub issue

Describe the bug

On each route not using a load function, the console has

[Warning] <Page> was created with unknown prop 'data' (+page.svelte, line ...)
[Warning] <Page> was created with unknown prop 'errors' (+page.svelte, line ...)

These can be removed with the boilerplate

export let data;
export let errors;

in the +page.svelte files for those routes, but ideally the warnings would not be present unless the route has an associated load function.

Reproduction

Launch a SvelteKit app that includes routes which do not explicitly accept data or errors and check the console.

Logs

No response

System Info

System:
    OS: macOS 12.5
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 25.14 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.4.0 - ~/Library/pnpm/node
    npm: 8.12.1 - ~/Library/pnpm/npm
  Browsers:
    Safari: 15.6
  npmPackages:
    @sveltejs/adapter-static: 1.0.0-next.38 => 1.0.0-next.38 
    @sveltejs/kit: next => 1.0.0-next.411 
    svelte: ^3.49.0 => 3.49.0 
    vite: ^3.0.8 => 3.0.8

Severity

annoyance

Additional Information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:14
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
kevinrenskerscommented, Sep 4, 2022

This got closed a while back but I am still seeing frequent <Page> was created with unknown prop 'errors' warnings for pages without a load function.

2reactions
dummdidummcommented, Aug 17, 2022

This comes from a warning in Svelte core, which we IMHO could just remove. I also believe there is some (closed?) issue in this repo already noticing the same thing in a different context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spurious Warnings • REPL • Svelte
1. /* App.svelte generated by Svelte v3.16.5 */ ; 2. import { SvelteComponent, init, safe_not_equal } from "svelte/internal"; ; 3. ​ ; 4....
Read more >
Dynamic behavior in Svelte: working with variables and props
In this article we'll be using variables and props to make our app dynamic, allowing us to add and delete to-dos, mark them...
Read more >
Changelog | Meteor API Docs
The most noticeable improvement is when modifying a file only used on the client Meteor will only rebuild the client, even if the...
Read more >
Hypothesis
Error when adding to fresh SvelteKit project · Issue #102 · svelte-add/svelte-add ... Samba - rsync - some files vanished before... but which?...
Read more >
[uibuilder new release] v5.1.1 - Some nice new features and ...
Create a UI partially or fully from JSON data either from files, ... Removes spurious warning about socket.io client not being found.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found