icerpc / icerpc-docs

Documentation site for IceRPC
https://docs.icerpc.dev
Other
7 stars 6 forks source link

Getting Hydration failed error when rendering the docs #134

Closed pepone closed 1 year ago

pepone commented 1 year ago
Unhandled Runtime Error
Error: Hydration failed because the initial UI does not match what was rendered on the server.

See more info here: https://nextjs.org/docs/messages/react-hydration-error

Call Stack
throwOnHydrationMismatch
node_modules\react-dom\cjs\react-dom.development.js (12507:0)
tryToClaimNextHydratableInstance
node_modules\react-dom\cjs\react-dom.development.js (12520:0)
ReeceHumphreys commented 1 year ago

What page were you getting this on? I just tested some pages locally and on docs.testing.zeroc.com and did not get any rehydration errors.

pepone commented 1 year ago

I got this on Windows, clean build.

Fails with all pages I tried

ReeceHumphreys commented 1 year ago

Clean build as in git clean -dfX then npm i, then npm run dev?

pepone commented 1 year ago

Clean build as in git clean -dfX then npm i, then npm run dev?

Yes, maybe a Windows issue.

ReeceHumphreys commented 1 year ago

Yes, maybe a Windows issue.

That is my current thought as well. I will see if I can reproduce the issue later on today.

pepone commented 1 year ago

I can confirm works fine on my macOS machine

ReeceHumphreys commented 1 year ago

Yes, I was able to get it to reproduce on Austins widows machine locally too, I suspect it may be how we load the markdown files not playing well with the windows file sys.

ReeceHumphreys commented 1 year ago

The issue was with assuming the file path would be using / whereas on windows it is \. Fixed by https://github.com/icerpc/icerpc-docs/commit/32aeb15005eb3e2b06604dd6ad8a9f710fb07847