Skip to content
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

<svelte:component this={null}/> fails in SSR mode #1605

Closed
Rich-Harris opened this issue Jul 20, 2018 · 3 comments
Closed

<svelte:component this={null}/> fails in SSR mode #1605

Rich-Harris opened this issue Jul 20, 2018 · 3 comments
Labels

Comments

@Rich-Harris
Copy link
Member

In the REPL, we get an error —

missingComponent is not defined

— and in my local project I'm seeing

_WEBPACK_GARBLE___default.a.data is not a function

@Rich-Harris
Copy link
Member Author

ah, I misunderstood the error. It's caused by an SSR component trying to render a child DOM component (i.e. the webpack config is excluding external modules, so pkg.main is being imported instead of pkg.svelte).

Perhaps Svelte should try and detect this situation and offer a more meaningful error. It won't be able to tell people exactly what to do, but it could point them in the right direction.

The REPL bug is still mysterious though.

Rich-Harris added a commit that referenced this issue Jul 21, 2018
provide more helpful error if SSR component tries to render non-SSR component
@Conduitry
Copy link
Member

Are you still seeing the REPL bug? Everything looks to be working fine to me.

@Conduitry
Copy link
Member

Closing this, I don't think there's anything else to do here beyond #1606.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants