-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
<Routes> received an unexpected slot "default". #981
Comments
This comment has been minimized.
This comment has been minimized.
looks fixed in "SvelteKit v1.0.0-next.74" |
I was wrong, it still throws a warning. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
People, you don't need to comment saying that the warning is still there. As long as the issue remains open you can assume it's still there — that's how issues work :) |
This comment has been minimized.
This comment has been minimized.
It is just a dev-time warning, none of these show up in the production build. |
Could this issue be addressed at Svelte level? For package creators it would be nice to be to able to tell Svelte to filter harmless warnings produced by the package. Something like window.__svelteMsgFilter = msg => msg !== 'ignore me' |
I think it'll have to be addressed at a Svelte level somehow, yeah |
I'm having this warning when routing to other pages, just like your case. However, If I navigate to a page whose path isn't Something might have gone wrong moving from Sapper to Sveltekit 😔 https://github.com/puruvj/puruvjdev3-svelte Anyone else facing the same issue? |
Is this issue being tracked in Svelte repository? I am finding PRs addressing similarly sounding issues being merged and issues closed. |
It is refreshing the browser page, not just polluting the logs. It makes literally a new network request to get resources each time it throws that warning. |
I notice is you add the "slot" tags in your pages it suppress the log. I seems logical as somehow a default slot content is provided to pages. |
That warning has been showing up since I first started using sapper two years ago, no idea what causes it but it's yet to cause an actual issue |
So the default slot inside |
I think it's much more involved than that, as I get a warning for every exported prop on every page all the time always. I will have hundreds upon hundreds of these warnings when in development...it's no fun, to be sure, but as you say, they do not show up in production...dunno at this point if this is a bug or a feature...maybe a little Stockholm Syndrome? 🤪 |
Has anyone found a solution to this issue? I tried naming the slot in
is coming back with a nicely formatted:
|
This issue is happening to me in another way. I just created a new project via |
This seem to do the trick for now! For some unknown reason the components are receiving an unexpected slot "default" (unnamed slot), while the component don't have a default slot |
Closing this in favor of the issue in the Svelte repo since that's where this would need to be solved sveltejs/svelte#6325 |
Check which version of Svelte you are running, I was running 3.44.0 but after I updated to 3.44.3 the issued resolved itself. |
I am having funny console logs saying that my svelte component `received an unexpected slot "default".`. This issue is described here: sveltejs/kit#981 Supposedly, updating svelte to version 3.44.3 solves this issue. I couldn't test it, though.
* Update svelte version in renderer-svelte I am having funny console logs saying that my svelte component `received an unexpected slot "default".`. This issue is described here: sveltejs/kit#981 Supposedly, updating svelte to version 3.44.3 solves this issue. I couldn't test it, though. * Update Svelte to 3.44.3 to get rid of console warning that component receives an unexpected slot "default".
Does anyone know the reason why this is happening? I issued a pull request for astros svelte renderer to update to the latest svelte version 3.44.3 but the issue persists. It's not a deal breaker. It's only annoying when you get the same warning for every svelte-component you use. Cheers! |
Glad it's not just me seeing this in Astro then. Have you found a way to deal with it? |
Unfortunately, I haven't … |
Weird.. using Svelte (not SvelteKit) and Routify (V3), I also get these warnings and their variations at
No clue what's causing them... |
@divStar it's Svelte that generates these, not Kit. They occur when you pass a prop to a component, but the component doesn't have a corresponding |
Describe the bug
Recently appeared in a dev tool three warnings.
Logs
received an unexpected slot "default". index.mjs?v=76284753:1656
was created with unknown prop 'status' index.svelte:2
was created with unknown prop 'error' index.svelte:2
To Reproduce
npm init svelte@next
npm install
npm run dev
in browser, open dev tool and navigate to http://localhost:3000
The text was updated successfully, but these errors were encountered: