vitepress
vitepress copied to clipboard
Hydration completed but contains mismatches when linking directly to pages
Describe the bug
If I first navigate to root I'm able to navigate through the documentation without issue, however if I send a link to a particular page the content renders for a split second and then disappears. The console outputs Hydration completed but contains mismatches.. My site is being served behind Cloudflare.
Reproduction
Build for production, validate that all pages are navigable. Copy a link to a specific page and paste it into an incognito session.
Expected behavior
The page renders as expected.
System Info
System:
OS: macOS 14.5
CPU: (14) arm64 Apple M3 Max
Memory: 7.86 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Yarn: 1.22.22 - ~/Library/Application Support/Herd/config/nvm/versions/node/v18.20.3/bin/yarn
npm: 10.7.0 - ~/Library/Application Support/Herd/config/nvm/versions/node/v18.20.3/bin/npm
bun: 1.1.13 - ~/.bun/bin/bun
Browsers:
Chrome: 127.0.6533.89
Safari: 17.5
npmPackages:
vitepress: ^1.3.1 => 1.3.1
Additional context
No response
Validations
- [X] Check if you're on the latest VitePress version.
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Please provide a reproducible example. Check if you’ve auto minify disabled on cloudflare and are not rendering any invalid HTML. Does this issue happen if you build and preview locally? Can you try building with DEBUG=true env var?
https://vitepress.dev/guide/deploy#netlify-vercel-cloudflare-pages-aws-amplify-render