Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When extracting example from repo, getting errors with hydration #391

Closed
rdewolff opened this issue Jul 10, 2023 · 2 comments
Closed

When extracting example from repo, getting errors with hydration #391

rdewolff opened this issue Jul 10, 2023 · 2 comments
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@rdewolff
Copy link

Description

When I clone the repo and copy the example to another dir, they don't run properly.

I have tried with the examples/example-next-13 and the examples/example-next-13-next-auth.

When running them locally, they trigger an hydration error:

app-index.js:31 Warning: An error occurred during hydration. The server HTML was replaced with client content in <#document>.
window.console.error @ app-index.js:31
console.error @ hydration-error-info.js:45

What am I missing here? Thanks in advance for the help.

PS: sorry when creating repro in codesandbox from git, the error is not present.

Mandatory reproduction URL (CodeSandbox or GitHub repository)

https://github.com/amannn/next-intl/tree/main/examples/example-next-13

Reproduction description

Steps to reproduce:

  1. Clone repo
  2. Copy example in another dir
  3. pnpm i and pnpm dev
  4. The web site will trigger an hydration error 💔

Expected behaviour

Copying/forking the examples should work without error.

@rdewolff rdewolff added bug Something isn't working unconfirmed Needs triage. labels Jul 10, 2023
@amannn
Copy link
Owner

amannn commented Jul 11, 2023

I just tried copying example-next-13 from the main branch to a new folder and didn't get a hydration mismatch. Can you provide a reproduction?

@rdewolff
Copy link
Author

I just found it out, it's due to my browser - Arc and its extensions 🙄 I have disabled all extension my profile and still raise an issue. But it works in incognito mode.

The docs at Next.js helped: https://nextjs.org/docs/messages/react-hydration-error which links to the following thread discussing the issue facebook/react#24430.

In Firefox and Chrome it works.

Hope this can help someone else down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants