Next.js Discord

Discord Forum

nextjs _document.js occurs hydration error

Answered
bscdev#1145 posted this in #help-forum
Open in Discord
Hello everyone, My application requires strict csp implementation so I implemented it in next.config.js as per docs. But while testing on live https ec2 server I noticed that csp is still not implemented.

Then I created _document.js file as per docs and implemented csp it works fine with live server.

But every time I am getting an console hydration error due to _document.js .error is "hydration will likely fail and fall back to client rendering
at title
at Head
Head(webpack-internal:///.node_modules/next/dist/pages/_document.js
"
Please help to resolve this.
Answered by bscdev#1145
Above issue is also reloved.
View full answer

1 Reply

Above issue is also reloved.
Answer