-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Teleport is throwing "TypeError: Cannot read property 'nextSibling' of null" on SSR #1235
Comments
The content of <div id="endofbody"><div id="content"><p>this will be moved to #endofbody.<br />Pretend that it's a modal</p></div> |
@underfin thanks for looking into this. Not sure I understand why I would try to teleport the content if I have to add it to the target element too. Maybe Edit: Yes forcing it to render client side only solves the issue. I guess I was wrong to assume it'd work on SSR too. |
Yeah.The |
FYI, after the fix in #1271 you should now get a warning about |
I see, thanks for the tip @yyx990803, I got it now and thanks for fixing the issue @underfin. |
Version
3.0.0-beta.14
Reproduction link
https://github.com/ozguruysal/vue3-ssr-playground/tree/issue-teleport
Steps to reproduce
Please install (
yarn
), build (yarn build
) and run (yarn start
) the project in the reproduction link. An exampleteleport
is created in TeleportTest.vue and the teleport target is defined inserver.js
, here.What is expected?
Teleport should work without errors.
What is actually happening?
"TypeError: Cannot read property 'nextSibling' of null" error is thrown in browser console along with two warnings.
Also looks like
ssrTransformTeleport.ts
needs to be updated withTeleport
changes. Please see line 22.The text was updated successfully, but these errors were encountered: