` has a conditional rendered children using `v-if`, the following error is thrown:\r\n\r\n```shell\r\nTypeError: Cannot read properties of null (reading 'nextSibling')\r\n at nextSibling (framework.w6niQ9Mc.js:17:682)\r\n at kt (framework.w6niQ9Mc.js:13:29640)\r\n at N (framework.w6niQ9Mc.js:13:21176)\r\n at v (framework.w6niQ9Mc.js:13:23760)\r\n at Object.process (framework.w6niQ9Mc.js:13:37355)\r\n at N (framework.w6niQ9Mc.js:13:21489)\r\n at v (framework.w6niQ9Mc.js:13:23760)\r\n at O (framework.w6niQ9Mc.js:13:23130)\r\n at L (framework.w6niQ9Mc.js:13:22048)\r\n at N (framework.w6niQ9Mc.js:13:21426)\r\n```\n\n### Reproduction\n\nMinimal reproduction link: https://stackblitz.com/edit/vitepress-nextsibling-ssr-error\r\n\r\nSee the `TeleportedComponent.vue` and `error-demo.md` files.\r\n\r\n___\r\n\r\n**Reproduction steps**:\r\n\r\n- Create a production build (`npm run docs:build`)\r\n- Serve the production (`npm run docs:dev`)\r\n- Go directly the URL where the custom component is imported\r\n- Interact with the custom component button to trigger the menu\r\n- An error is thrown in the console, the component doesn't work\r\n\r\nNow, this issue can be avoided if the user go to any other page that doesn't contain the component, and go back to this page.\n\n### Expected behavior\n\nThe conditional rendering of the children using a `v-if`, inside the `\u003CTeleport />`, should not cause any issues on the first page load.\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 14.5\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 95.19 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node\r\n Yarn: 1.22.19 - ~/.yarn/bin/yarn\r\n npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm\r\n pnpm: 8.15.1 - ~/Library/pnpm/pnpm\r\n Browsers:\r\n Brave Browser: 126.1.67.123\r\n Chrome: 126.0.6478.126\r\n Safari: 17.5\r\n npmPackages:\r\n vitepress: 1.2.3 => 1.2.3\n```\n\n\n### Additional context\n\nI've first noticed the issue when working on an open-source [vue3-select-component](https://github.com/TotomInc/vue3-select-component).\r\n\r\nE.g. go to https://vue3-select-component.vercel.app/demo/single-select.html and interact with the component. You'll see the same error thrown in the console.\r\n\r\nFor reference: https://github.com/TotomInc/vue3-select-component/issues/78\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2965],{"name":2955,"color":2956},3987,"SSR issue with Teleport and conditional rendering of its children (Cannot read properties of null (reading 'nextSibling'))","2024-07-04T04:41:55Z","https://github.com/vuejs/vitepress/issues/3987",0.7370182,["Reactive",2972],{},["Set"],["ShallowReactive",2975],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f6_xdbwfkquIrCtJV6_bdemMpwbJSfbt0TXVhT23UQfs":-1},"/vuejs/vitepress/3974"]