Skyleen77 / next-nprogress-bar

NProgress integration on Next.js compatible with /app and /pages folders
https://next-nprogress-bar.vercel.app
315 stars 24 forks source link

Entire page `/{page}` deopted into client-side rendering. #25

Closed Lenghak closed 7 months ago

Lenghak commented 11 months ago

Hi! I am a fan. I encountered a problem while running the build command in Next.js 13.5.2, which resulted in a ton of warnings for each of my pages. The warnings stated that the Entire page '/page/...' was deopted into client-side rendering. I spent a lot of time searching for this bug and finally discovered that it was caused by the AppProgressBar. Therefore, my purpose here is to suggest updating the documentation to advise users to wrap the component with Suspense at which file they call AppProgressBar in order to eliminate the warnings. Otherwise, it might display misleading messages, leading to a waste of time in bug hunting.

ksdaylight commented 10 months ago

Please note that this is not just a warning, it will indeed cause pages that should be SSG to be forced to CSR. Developers should pay attention. This can be checked in the following ways:

  1. Request a certain URL in the Next project deployed in the prod environment
  2. Check the html document it initially obtained
  3. Check out that there is no complete html content obtained through SSG that should be there!

This means that all the benefits of next.js such as SEO, loading speed, etc. are gone! This is a very, very bad bug!

Quicker_20231129_213937

Lenghak commented 10 months ago

Exactly. It does what it says, hence leading to unexpected problems or behaviors that can be potentially break the whole application.

Skyleen77 commented 7 months ago

This will be applied in the next update