-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Spurious prop warnings with +page.svelte
files
#5980
Comments
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. |
The warning is helpful if you accidentally use the wrong binding on a component. |
sveltejs/svelte#4652 looks to be the issue in the Svelte repo. If we're going to be removing annoying warnings then I'd also nominate sveltejs/svelte#6325 |
I agree that the warning is useful in many cases (I've definitely caught a lot of issues thanks to those warnings), but only when I'm intentionally passing props around. If I don't have a |
Agree, the warning should only appear if we're passing |
This comment was marked as duplicate.
This comment was marked as duplicate.
The problem is - how do we leave the warning in place while silencing it for this use case? There would have to be some kind of runtime code involved. Two possibilities I can think of:
|
This comment was marked as duplicate.
This comment was marked as duplicate.
@Rich-Harris Perhaps not even in those cases, sometimes you're just returning data for the layout(s) to consume, you don't necessarily need it in the |
This is a hack, but it's a working quick solution. Fixes #5980
This is a hack, but it's a working quick solution. Fixes #5980
This got closed a while back but I am still seeing frequent |
Yeah, I still get them sometimes when hot reloading too |
Reopening as they can appear as a result of Vite hot module reload. Not sure how we can silence these except turning on the warning-silence-hack all the time. |
True, it seems limited to HMR. |
Fixes #5980 This could result in false negatives but the probability for that is minimal and not seing the warning sometimes is better than seing the warning without being able to do anything about it
Fixes #5980 This could result in false negatives but the probability for that is minimal and not seing the warning sometimes is better than seing the warning without being able to do anything about it
@TeamDman I'm getting the same error message. Did you find a possible solution? |
Just ignored it for now |
Describe the bug
On each route not using a
load
function, the console hasThese can be removed with the boilerplate
in the
+page.svelte
files for those routes, but ideally the warnings would not be present unless the route has an associatedload
function.Reproduction
Launch a SvelteKit app that includes routes which do not explicitly accept
data
orerrors
and check the console.Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: