vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

testing environment refresh page error. example: framework.gVONBIN7.js:13 Hydration completed but contains mismatches.

Open thompsonjiang opened this issue 1 year ago • 5 comments
trafficstars

Describe the bug

image

Reproduction

测试环境刷新页面即可复现,本地运行正常 image image

Expected behavior

find the reason and fix it

System Info

window chrome virepress v1.3.2  node.js v16.18.0

Additional context

No response

Validations

thompsonjiang avatar Aug 29 '24 02:08 thompsonjiang

Cannot find the reason without looking at your code. Please provide a minimal reproducible example. Some component of yours might not be SSR compatible. You will need to either make it SSR compatible or wrap it with <ClientOnly>. https://vitepress.dev/guide/ssr-compat

You can get more helpful warnings by specifying export DEBUG=true (set DEBUG=true in Windows cmd) and then building your vitepress app and previewing it.

brc-dd avatar Aug 29 '24 03:08 brc-dd

You can get more helpful warnings by specifying export DEBUG=true (set DEBUG=true in Windows cmd) and then building your vitepress app and previewing it.

image image image image Only one global component .I can't find reson.

thompsonjiang avatar Sep 04 '24 01:09 thompsonjiang

You can get more helpful warnings

I meant in browser console. Not your terminal.

Is your repo public?

Only one global component

Does it work if you remove it? (both from theme and markdown)?

brc-dd avatar Sep 04 '24 03:09 brc-dd

You can get more helpful warnings

I meant in browser console. Not your terminal.

Is your repo public?

Only one global component

Does it work if you remove it? (both from theme and markdown)?

Not about the component. This is a simple demo.

vitepress-demo.zip

thompsonjiang avatar Sep 04 '24 10:09 thompsonjiang

You can get more helpful warnings

I meant in browser console. Not your terminal.

Is your repo public?

Only one global component

Does it work if you remove it? (both from theme and markdown)?

I have discovered the reason. Remove "cleanUrls". image

thompsonjiang avatar Sep 05 '24 03:09 thompsonjiang