shuding / nextra

Simple, powerful and flexible site generation framework with everything you love from Next.js.
https://nextra.site
MIT License
11.87k stars 1.28k forks source link

Sidebar hidden in production only #2920

Open amcdnl opened 5 months ago

amcdnl commented 5 months ago

Issue

After upgrading to the latest NextJS ( 14.2.3 from 14.0 ), the sidebar appears for a split second and then disappears. This only happens in production, in development it seems to work fine.

Reproduce

The project is open source so you can see the code and the example can be found in the vercel preview. The site is deployed currently on the older version so you can compare that as well.

This is actually happening on another repo as well I upgraded but the code is very similar so not worth illustrating in this ticket.

Remediation Steps

I've tried the follow steps to remediate this before logging this ticket:

Versions

"next": "^14.2.3",
"nextra": "2.13.4",
arno-fukuda commented 5 months ago

The sidebar disappears the moment the console errors show up. (Hydration errors)

Did you try adding these lines back? https://github.com/reaviz/reaviz-website/pull/3/files#diff-17be8492ca585928ea40960b5a6f48a8f48a4ae636d39966d8af749f63e0403fL2-L13

amcdnl commented 5 months ago

The sidebar disappears the moment the console errors show up. (Hydration errors)

Did you try adding these lines back? https://github.com/reaviz/reaviz-website/pull/3/files#diff-17be8492ca585928ea40960b5a6f48a8f48a4ae636d39966d8af749f63e0403fL2-L13

I added them back but same result.

arno-fukuda commented 5 months ago

The sidebar disappears the moment the console errors show up. (Hydration errors) Did you try adding these lines back? https://github.com/reaviz/reaviz-website/pull/3/files#diff-17be8492ca585928ea40960b5a6f48a8f48a4ae636d39966d8af749f63e0403fL2-L13

I added them back but same result.

Can you redeploy the same preview build from within Vercel and make sure "use existing build cache" is unchecked?

amcdnl commented 5 months ago

The sidebar disappears the moment the console errors show up. (Hydration errors) Did you try adding these lines back? https://github.com/reaviz/reaviz-website/pull/3/files#diff-17be8492ca585928ea40960b5a6f48a8f48a4ae636d39966d8af749f63e0403fL2-L13

I added them back but same result.

Can you redeploy the same preview build from within Vercel and make sure "use existing build cache" is unchecked?

Done.

amcdnl commented 5 months ago
image

I noticed the errors seem related to the nav menu items?

arno-fukuda commented 5 months ago

Hard to tell where it's failing.

If you turn off Javascript in dev tools, the page renders fine, so that js chunk is causing it for sure.