Support Forums

Netlify + NextJS - no hydration


When I run locally using netlify dev -e, it runs “normally” but once I build with server-side rendering on Netlify, none of the javascript is executed on the client side. The build succeed and the preview is deployed but no javascript run on the client side.

Am I missing a configuration ?

Thank you.

so… I am not sure how to explain. I spent the day debugging.

It seems that what breaks is that I had a components B,
in my component A, I import the a.module.scss and I wanted to also re-use some stuff from B so I also imported b.module.scss, which make the entire client-side javascript be turned off silently… without any errors…

Hi there, @leoB :wave:

Thanks so much for reaching out. It looks like this thread has been quiet for the past week. Are you still encountering issues for this? If you are, please file an issue on our nextjs repo. In this issue I suggest including your site, the repo you are working from, and debugging steps you have taken.

Thank you :netliconfetti:

The solution I found was to convert all my .module.scss file to CSS-in-JS const in the code itself. So I removed all scss files and moved the css in javascript. It was a nightmare and took so long but it works.

1 Like

Thank you for coming back and sharing this with us! It will be beneficial for future Forums members who encounter something similar.

1 Like