Spurious prop warnings with `+page.svelte` files
See original GitHub issueDescribe 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:
- Created a year ago
- Reactions:14
- Comments:14 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.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.